This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, matt-davis, r.david.murray
Date 2020-04-23.14:33:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587652382.08.0.671940827619.issue40359@roundup.psfhosted.org>
In-reply-to
Content
Yeah, that looks like a bug in the old API.  If you try the new API, it does the right thing.  To do that, import email.policy and make your message_as_string call:

  email.message_from_string(raw, policy=email.policy.default)

Note, however, that you really ought to be using message_from_bytes.  Serialized email messages are bytes, not unicode, and using message_from_string will get you in to other trouble.

I don't know if it is worth fixing the old API.
History
Date User Action Args
2020-04-23 14:33:02r.david.murraysetrecipients: + r.david.murray, barry, matt-davis
2020-04-23 14:33:02r.david.murraysetmessageid: <1587652382.08.0.671940827619.issue40359@roundup.psfhosted.org>
2020-04-23 14:33:01r.david.murraylinkissue40359 messages
2020-04-23 14:33:01r.david.murraycreate