summaryrefslogtreecommitdiffstats
path: root/Lib/email/policy.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-09-09 22:39:18 (GMT)
committerR David Murray <rdmurray@bitdance.com>2016-09-09 22:39:18 (GMT)
commit06ed218ed0020003ac388572fbcf09b88075b664 (patch)
tree5a44ac4cb9d85a35fe9d8423e6700176f5de8352 /Lib/email/policy.py
parent37df068e862c4bbab16da00de72655c4a737ea94 (diff)
downloadcpython-06ed218ed0020003ac388572fbcf09b88075b664.zip
cpython-06ed218ed0020003ac388572fbcf09b88075b664.tar.gz
cpython-06ed218ed0020003ac388572fbcf09b88075b664.tar.bz2
#20476: add a message_factory policy attribute to email.
Diffstat (limited to 'Lib/email/policy.py')
-rw-r--r--Lib/email/policy.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index 35d0e69..5131311ac 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -7,6 +7,7 @@ from email._policybase import Policy, Compat32, compat32, _extend_docstrings
from email.utils import _has_surrogates
from email.headerregistry import HeaderRegistry as HeaderRegistry
from email.contentmanager import raw_data_manager
+from email.message import EmailMessage
__all__ = [
'Compat32',
@@ -82,6 +83,7 @@ class EmailPolicy(Policy):
"""
+ message_factory = EmailMessage
utf8 = False
refold_source = 'long'
header_factory = HeaderRegistry()