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.

Title: If new email policies are used, default message factory should be EmailMessage
Type: enhancement Stage: resolved
Components: Documentation, email, Library (Lib) Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: aj guy, barry, docs@python, python-dev, r.david.murray
Priority: high Keywords: patch

Created on 2014-02-01 22:08 by r.david.murray, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
use_emailmessage.patch r.david.murray, 2014-02-01 22:08 review
message_factory.diff r.david.murray, 2016-09-07 23:57 review
Messages (6)
msg209921 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-02-01 22:08
This was part of the design of the new stuff added in 3.4, so it is a bug that it doesn't work...somehow I missed implementing this detail.  The full implementation should make this a policy setting, so that a custom policy could specify its own factory.  However, since 3.4 is in beta it would be a bad time to add that to the policy.

The patch proposed here implements the required behavior by hardcoding any non-compat32 policy to use EmailMessage instead of Message in feedparser.
msg210482 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-02-07 15:44
New changeset 77082b818676 by R David Murray in branch 'default':
#20476: use EmailMessage as factory if non-compat32 policy is used.
msg210483 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-02-07 15:46
I'm leaving this open and changing the version to 3.5 to remind myself to fix this right once default is open for 3.5 changes.
msg274922 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-09-07 23:57
Here's the patch to add the message_factory policy attribute.
msg275480 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-09 22:40
New changeset 9ba8f4be0651 by R David Murray in branch 'default':
#20476: add a message_factory policy attribute to email.
msg275563 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 04:25
New changeset 8375b8d54bf7 by R David Murray in branch 'default':
#20476: Deal with the message_factory circular import differently.
Date User Action Args
2022-04-11 14:57:57adminsetgithub: 64675
2016-09-10 04:25:34python-devsetmessages: + msg275563
2016-09-09 23:05:04r.david.murraysetstatus: open -> closed
type: resource usage -> enhancement
stage: needs patch -> resolved
resolution: fixed
versions: + Python 3.6, - Python 3.5
2016-09-09 22:40:36python-devsetmessages: + msg275480
2016-09-07 23:57:19r.david.murraysetfiles: + message_factory.diff

messages: + msg274922
2015-10-02 04:43:43aj guysetassignee: docs@python

type: behavior -> resource usage
components: + Documentation, Library (Lib)
nosy: + docs@python, aj guy
2014-02-07 15:46:14r.david.murraysetstage: commit review -> needs patch
messages: + msg210483
versions: + Python 3.5, - Python 3.4
2014-02-07 15:44:48python-devsetnosy: + python-dev
messages: + msg210482
2014-02-01 22:08:05r.david.murraycreate