#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:
R David Murray 2014-02-07 10:44:16 -05:00
parent 11c5afd138
commit aa21297457
4 changed files with 37 additions and 10 deletions

View file

@ -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