From 293bf7ad89c837d6a2ee9e08443c00703172d953 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 1 Aug 2018 11:14:52 -0700 Subject: helper: replace email_as_* with email builtins Python 3.3 added a new feature to the email module, policies (https://docs.python.org/3.5/library/email.policy.html). Policy objects allow precise control over how numerous features work when converting to and from str or bytes. With the `email.policy.SMTP` the behavior of email_as_bytes and email_as_string can be achieved using the builtin `.as_string()` and `.as_bytes()` methods, without custom code or the need to test it. Additionally these methods handle corner cases that we don't currently handle, such as multi-part messages with different encodings. Fixes #1257 --- NEWS | 1 + 1 file changed, 1 insertion(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 492b4708..6ac982e8 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ * Port to python 3. Python 2.x no longer supported * feature: Add a new 'namedqueries' buffer type for displaying named queries. * feature: Replace twisted with asyncio +* bug fix: correct handling of subparts with different encodings 0.7: * info: missing html mailcap entry now reported as mail body text -- cgit v1.2.3