New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2 and 3 compat, use message encoding added to repoze.sendmail #12

merged 8 commits into from Mar 15, 2012


None yet
2 participants

rpatterson commented Mar 15, 2012

No description provided.

rpatterson added some commits Mar 13, 2012

Python 2 and 3 compat, low hanging fruit. All tests pass under 2,
still have failures under 3 but the tests run and there are fewer
Use email.header.Header to properly handle encoding/decoding headers
with non-ascii characters.

Removes the need for the properly_encode_header function.  We also add
special handling of `ascii` or `latin_1` so that headers that can be
encoded without the ugly RFC 2047 encoding if possible.
Text encoding should only be handled for messages using encoders.enco…

Also use the same logic for trying to find the best encoding that we
use for headers.
Python 3 seems to append a newline where Python 2 doesn't.
I'm assuming Python 3 is correct and the lack in Python 2 is not
significant enough to break anything.

@mcdonc mcdonc merged commit 49d86a2 into Pylons:master Mar 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment