]> granicus.if.org Git - python/commit
#1672568: email now registers defects for base64 payload format errors.
authorR David Murray <rdmurray@bitdance.com>
Mon, 28 May 2012 01:23:34 +0000 (21:23 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 28 May 2012 01:23:34 +0000 (21:23 -0400)
commit80e0aee95b8c4a7da8a1b794793a9e9537d021cf
tree36bc2ab00ee8552d10ea4b92f80f9bf9355a55fd
parentadbdcdbd9527a3c4000cd4ff0678ff60151f1f79
#1672568: email now registers defects for base64 payload format errors.

Which also means that it is now producing *something* for any base64
payload, which is what leads to the couple of older test changes in
test_email.  This is a slightly backward incompatible behavior change,
but the new behavior is so much more useful than the old (you can now
*reliably* detect errors, and any program that was detecting errors by
sniffing for a base64 return from get_payload(decode=True) and then doing
its own error-recovery decode will just get the error-recovery decode
right away).  So this seems to me to be worth the small risk inherent
in this behavior change.

This patch also refactors the defect tests into a separate test file,
since they are no longer just parser tests.
Doc/library/email.errors.rst
Doc/library/email.message.rst
Lib/email/message.py
Lib/test/test_email/test_defect_handling.py [new file with mode: 0644]
Lib/test/test_email/test_email.py
Lib/test/test_email/test_parser.py