]> granicus.if.org Git - python/commit
#20476: Deal with the message_factory circular import differently.
authorR David Murray <rdmurray@bitdance.com>
Sat, 10 Sep 2016 04:22:25 +0000 (00:22 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 10 Sep 2016 04:22:25 +0000 (00:22 -0400)
commitb067c8fdd1e205bd0411417b6d5e4b832c3773fc
tree1bd428963f46ae7cec4bceedfc9c3a049ce3102e
parentc7454ff5fcd8d216495990df7db11be73e273a33
#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.
Doc/library/email.policy.rst
Lib/email/_policybase.py
Lib/email/feedparser.py
Lib/email/message.py
Lib/test/test_email/test_policy.py