lp:~qwertyface/localmail/localmail
- Get this branch:
- bzr branch lp:~qwertyface/localmail/localmail
Branch merges
- Simon Davy: Approve
-
Diff: 543 lines (+221/-62)10 files modified.bzrignore (+1/-0)
localmail/cred.py (+11/-8)
localmail/imap.py (+6/-6)
localmail/inbox.py (+36/-16)
localmail/smtp.py (+18/-12)
tests/helpers.py (+6/-3)
tests/spam/check.py (+10/-9)
tests/test_localmail.py (+129/-5)
tox.ini (+2/-1)
twisted/plugins/localmail_tap.py (+2/-2)
Branch information
Recent revisions
- 55. By Peter Russell
-
Fix a few errors relating to non-ascii mails
* Correctly convert message payloads to bytes in inbox.py
* Correctly decode message headers in inbox.py
* Convert a few strings including '\' characts to raw strings
* Add tests which round-trip non-ascii mail with differing encodings
(these could probably do with a refactor) - 53. By Peter Russell
-
Hacked together Python 3.5 support.
I've tried to minimize the code changes in doing this, so some cleanup
may be necessary.This hasn't been tested with Python 2.6, but it should support everything
that is used.Changes:
* Fix up imports to consistently use relative imports
* Move Zope Interface implementations to use @implementer decorators.
* Ignore .eggs/ in the root. This seems to be tox gumph.
* Use io.BytesIO instead of cStringIO.StringIO where the latter fails to
import.
* Move from x.next() to next(x)
* Don't return a dict itemsview from MemoryIMAPMailbox.fetch( )
* Use some of the new Python3 email module binary functions. This is
necessary on Python 3.
* Work around the fact that Twisted sometimes seems to call
MemoryMessage.lineReceived( ) with bytes most of the time but str at
least once. It appears that the str is a header, so encoding it as
ASCII is probably OK? This is clearly a hack.
* Work around the fact that the legacy Python email get_payload() method
returns a str, when we want a bytes, by encoding it as latin-1. I think
this is probably safe in this particular case, but migrating to the new
API is probably the right fix.
* Use bytes literals in various places.
* Allow the LOCALMAIL environment variable to be passed to tox runs.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:localmail