diff options
| author | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
| commit | 44e43727be13e3554342c2b5b75b7dc42abdb18c (patch) | |
| tree | a0b97771f5d0856709ac8ab48c1e8f9eeecef352 /src/mailman/archiving | |
| parent | 065060e56ac2445b6749b60480e9c42573854c5e (diff) | |
| download | mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.gz mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.zst mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.zip | |
Checkpointing.
By using `six` I think I have most of the imports squared away. There's
probably still uses of `unicode` built-ins that need fixing.
The idea is to first get the test suite running (which it doesn't yet), and
then to fix tests.
There's a bug in lazr.config which requires us to patch it for now.
Diffstat (limited to 'src/mailman/archiving')
| -rw-r--r-- | src/mailman/archiving/prototype.py | 9 | ||||
| -rw-r--r-- | src/mailman/archiving/tests/test_prototype.py | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/mailman/archiving/prototype.py b/src/mailman/archiving/prototype.py index 153c44b69..e564b40b1 100644 --- a/src/mailman/archiving/prototype.py +++ b/src/mailman/archiving/prototype.py @@ -30,14 +30,13 @@ import errno import logging from datetime import timedelta -from mailbox import Maildir -from urlparse import urljoin - from flufl.lock import Lock, TimeOutError -from zope.interface import implementer - +from mailbox import Maildir from mailman.config import config from mailman.interfaces.archiver import IArchiver +from six.moves.urllib_parse import urljoin +from zope.interface import implementer + log = logging.getLogger('mailman.error') diff --git a/src/mailman/archiving/tests/test_prototype.py b/src/mailman/archiving/tests/test_prototype.py index fba46ea4b..6bc4f25b4 100644 --- a/src/mailman/archiving/tests/test_prototype.py +++ b/src/mailman/archiving/tests/test_prototype.py @@ -89,13 +89,13 @@ but the water deserves to be swum. def _find(self, path): all_filenames = set() for dirpath, dirnames, filenames in os.walk(path): - if not isinstance(dirpath, unicode): - dirpath = unicode(dirpath) + if isinstance(dirpath, bytes): + dirpath = dirpath.decode('utf-8') all_filenames.add(dirpath) for filename in filenames: new_filename = filename - if not isinstance(filename, unicode): - new_filename = unicode(filename) + if isinstance(filename, bytes): + new_filename = filename.decode('utf-8') all_filenames.add(os.path.join(dirpath, new_filename)) return all_filenames |
