]> granicus.if.org Git - python/commit
#18324: set_payload now correctly handles binary input.
authorR David Murray <rdmurray@bitdance.com>
Thu, 22 Aug 2013 01:10:31 +0000 (21:10 -0400)
committerR David Murray <rdmurray@bitdance.com>
Thu, 22 Aug 2013 01:10:31 +0000 (21:10 -0400)
commit00ae435deef434f471e39bea3f3ab3a3e3cd90fe
treeec2589f471e6ee602b6bdf169c87db706ddd1a8c
parent0b169125caf768b2dce97537d10470b3fdee9ec9
#18324: set_payload now correctly handles binary input.

This also backs out the previous fixes for for #14360, #1717, and #16564.
Those bugs were actually caused by the fact that set_payload didn't decode to
str, thus rendering the model inconsistent.  This fix does mean the data
processed by the encoder functions goes through an extra encode/decode cycle,
but it means the model is always consistent.  Future API updates will provide
a better way to encode payloads, which will bypass this minor de-optimization.

Tests by Vajrasky Kok.
Lib/email/encoders.py
Lib/email/message.py
Lib/test/test_email/test_email.py
Misc/NEWS