mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#20476: use EmailMessage as factory if non-compat32 policy is used.
In 3.5 I will fix this right by adding a message_factory attribute to the policy.
This commit is contained in:
parent
11c5afd138
commit
aa21297457
4 changed files with 37 additions and 10 deletions
|
@ -17,7 +17,7 @@ from email._policybase import compat32
|
|||
|
||||
|
||||
class Parser:
|
||||
def __init__(self, _class=Message, *, policy=compat32):
|
||||
def __init__(self, _class=None, *, policy=compat32):
|
||||
"""Parser of RFC 2822 and MIME email messages.
|
||||
|
||||
Creates an in-memory object tree representing the email message, which
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue