diff options
| author | drebs <drebs@leap.se> | 2013-08-19 09:09:50 -0300 | 
|---|---|---|
| committer | drebs <drebs@leap.se> | 2013-08-21 14:42:39 -0300 | 
| commit | 6c006183ba2021bf5bedf98e86fd5a7c1a4506ba (patch) | |
| tree | d7fb69ab17535239f93b58b51a528fc4ab13ae7e | |
| parent | 8bff5f1a55f845a77effc23e07de51df4480605f (diff) | |
Update to new soledad package scheme.
| -rw-r--r-- | mail/changes/feature_3487-split-soledad-into-common-client-and-server | 2 | ||||
| -rw-r--r-- | mail/setup.py | 2 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/fetch.py | 10 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/server.py | 4 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/service/imap-server.tac | 2 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/service/imap.py | 2 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/tests/__init__.py | 4 | ||||
| -rw-r--r-- | mail/src/leap/mail/imap/tests/test_imap.py | 4 | ||||
| -rw-r--r-- | mail/src/leap/mail/smtp/tests/__init__.py | 2 | 
9 files changed, 16 insertions, 16 deletions
| diff --git a/mail/changes/feature_3487-split-soledad-into-common-client-and-server b/mail/changes/feature_3487-split-soledad-into-common-client-and-server new file mode 100644 index 0000000..4698323 --- /dev/null +++ b/mail/changes/feature_3487-split-soledad-into-common-client-and-server @@ -0,0 +1,2 @@ +  o Update to new soledad package scheme (common, client and server). Closes +    #3487. diff --git a/mail/setup.py b/mail/setup.py index 5597076..b389137 100644 --- a/mail/setup.py +++ b/mail/setup.py @@ -23,7 +23,7 @@ from setuptools import setup, find_packages  requirements = [ -    "leap.soledad>=0.2.3", +    "leap.soledad.client>=0.3.0",      "leap.common>=0.2.3-dev",      "leap.keymanager>=0.2.0",      "twisted", diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py index 267af38..96568d5 100644 --- a/mail/src/leap/mail/imap/fetch.py +++ b/mail/src/leap/mail/imap/fetch.py @@ -29,7 +29,8 @@ from twisted.internet.threads import deferToThread  from leap.common import events as leap_events  from leap.common.check import leap_assert, leap_assert_type -from leap.soledad import Soledad +from leap.soledad.client import Soledad +from leap.soledad.common.crypto import ENC_SCHEME_KEY, ENC_JSON_KEY  from leap.common.events.events_pb2 import IMAP_FETCHED_INCOMING  from leap.common.events.events_pb2 import IMAP_MSG_PROCESSING @@ -46,9 +47,6 @@ class LeapIncomingMail(object):      Fetches mail from the incoming queue.      """ -    ENC_SCHEME_KEY = "_enc_scheme" -    ENC_JSON_KEY = "_enc_json" -      RECENT_FLAG = "\\Recent"      INCOMING_KEY = "incoming" @@ -156,11 +154,11 @@ class LeapIncomingMail(object):              leap_events.signal(                  IMAP_MSG_PROCESSING, str(index), str(num_mails))              keys = doc.content.keys() -            if self.ENC_SCHEME_KEY in keys and self.ENC_JSON_KEY in keys: +            if ENC_SCHEME_KEY in keys and ENC_JSON_KEY in keys:                  # XXX should check for _enc_scheme == "pubkey" || "none"                  # that is what incoming mail uses. -                encdata = doc.content[self.ENC_JSON_KEY] +                encdata = doc.content[ENC_JSON_KEY]                  d = defer.Deferred(self._decrypt_msg(doc, encdata))                  d.addCallbacks(self._process_decrypted, log.msg)              else: diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py index 51df86e..0192444 100644 --- a/mail/src/leap/mail/imap/server.py +++ b/mail/src/leap/mail/imap/server.py @@ -36,8 +36,8 @@ from twisted.python import log  #import u1db  from leap.common.check import leap_assert, leap_assert_type -from leap.soledad import Soledad -from leap.soledad.sqlcipher import SQLCipherDatabase +from leap.soledad.client import Soledad +from leap.soledad.client.sqlcipher import SQLCipherDatabase  logger = logging.getLogger(__name__) diff --git a/mail/src/leap/mail/imap/service/imap-server.tac b/mail/src/leap/mail/imap/service/imap-server.tac index 16d04bb..8638be2 100644 --- a/mail/src/leap/mail/imap/service/imap-server.tac +++ b/mail/src/leap/mail/imap/service/imap-server.tac @@ -3,7 +3,7 @@ import os  from xdg import BaseDirectory -from leap.soledad import Soledad +from leap.soledad.client import Soledad  from leap.mail.imap.service import imap diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py index 380324c..ccaeee7 100644 --- a/mail/src/leap/mail/imap/service/imap.py +++ b/mail/src/leap/mail/imap/service/imap.py @@ -32,7 +32,7 @@ from leap.common.check import leap_assert, leap_assert_type  from leap.keymanager import KeyManager  from leap.mail.imap.server import SoledadBackedAccount  from leap.mail.imap.fetch import LeapIncomingMail -from leap.soledad import Soledad +from leap.soledad.client import Soledad  IMAP_PORT = 1984  # The default port in which imap service will run diff --git a/mail/src/leap/mail/imap/tests/__init__.py b/mail/src/leap/mail/imap/tests/__init__.py index fdeda76..f3d5ca6 100644 --- a/mail/src/leap/mail/imap/tests/__init__.py +++ b/mail/src/leap/mail/imap/tests/__init__.py @@ -22,8 +22,8 @@ import u1db  from leap.common.testing.basetest import BaseLeapTest -from leap.soledad import Soledad -from leap.soledad.document import SoledadDocument +from leap.soledad.client import Soledad +from leap.soledad.common.document import SoledadDocument  #----------------------------------------------------------------------------- diff --git a/mail/src/leap/mail/imap/tests/test_imap.py b/mail/src/leap/mail/imap/tests/test_imap.py index 8804fe0..3411795 100644 --- a/mail/src/leap/mail/imap/tests/test_imap.py +++ b/mail/src/leap/mail/imap/tests/test_imap.py @@ -61,8 +61,8 @@ from leap.mail.imap.server import SoledadMailbox  from leap.mail.imap.server import SoledadBackedAccount  from leap.mail.imap.server import MessageCollection -from leap.soledad import Soledad -from leap.soledad import SoledadCrypto +from leap.soledad.client import Soledad +from leap.soledad.client import SoledadCrypto  def strip(f): diff --git a/mail/src/leap/mail/smtp/tests/__init__.py b/mail/src/leap/mail/smtp/tests/__init__.py index d952405..7fed7da 100644 --- a/mail/src/leap/mail/smtp/tests/__init__.py +++ b/mail/src/leap/mail/smtp/tests/__init__.py @@ -29,7 +29,7 @@ from mock import Mock  from twisted.trial import unittest -from leap.soledad import Soledad +from leap.soledad.client import Soledad  from leap.keymanager import (      KeyManager,      openpgp, | 
