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 Michael Salsone, barry, r.david.murray
Date 2017-06-19.23:20:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497914433.86.0.745318511193.issue30706@psf.upfronthosting.co.za>
In-reply-to
Content
This isn't the place to get help on Python coding, but since this is a relatively new API I'll give you a pointer, and then you can tell me where the docs need improvement :)

If you do message_from_string(yourstring, policy=email.policy.default), you should get back an EmailMessage object.

That said, your example does return an EmailMessage for me, if I put a string in place of your self.original_message, which must be something from your program.  However, that won't *work* very well, because the policy is set to Compat32, and Compat32 and EmailMessage aren't designed to work together.  A lot of things will work fine, but you'll get some weird errors.  However, I don't think that that is worth a documentation note, since it is a logical consequence of using _class=EmailMessage without specifying a policy.
History
Date User Action Args
2017-06-19 23:20:33r.david.murraysetrecipients: + r.david.murray, barry, Michael Salsone
2017-06-19 23:20:33r.david.murraysetmessageid: <1497914433.86.0.745318511193.issue30706@psf.upfronthosting.co.za>
2017-06-19 23:20:33r.david.murraylinkissue30706 messages
2017-06-19 23:20:33r.david.murraycreate