diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-09-10 04:22:25 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-09-10 04:22:25 (GMT) |
commit | b067c8fdd1e205bd0411417b6d5e4b832c3773fc (patch) | |
tree | 1bd428963f46ae7cec4bceedfc9c3a049ce3102e /Lib/test/test_email | |
parent | c7454ff5fcd8d216495990df7db11be73e273a33 (diff) | |
download | cpython-b067c8fdd1e205bd0411417b6d5e4b832c3773fc.zip cpython-b067c8fdd1e205bd0411417b6d5e4b832c3773fc.tar.gz cpython-b067c8fdd1e205bd0411417b6d5e4b832c3773fc.tar.bz2 |
#20476: Deal with the message_factory circular import differently.
It turns out we can't depend on email.message getting imported every place
message_factory is needed, so to avoid a circular import we need to special
case Policy.message_factory=None in the parser instead of using monkey
patching. I had a feeling that was a bad idea when I did it.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r-- | Lib/test/test_email/test_policy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_policy.py b/Lib/test/test_email/test_policy.py index 1d95d03..8fecb8a 100644 --- a/Lib/test/test_email/test_policy.py +++ b/Lib/test/test_email/test_policy.py @@ -24,7 +24,7 @@ class PolicyAPITests(unittest.TestCase): 'cte_type': '8bit', 'raise_on_defect': False, 'mangle_from_': True, - 'message_factory': email.message.Message, + 'message_factory': None, } # These default values are the ones set on email.policy.default. # If any of these defaults change, the docs must be updated. |