[issue9124] Mailbox module should use binary I/O, not text I/O

STINNER Victor report at bugs.python.org
Wed Jan 26 11:00:29 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> I reverted r88197 because it was incorrect and caused an email test
> to fail. Once I come up with a test for it I'll fix it correctly.

test_mailbox is a good (indirect) test suite for this change. The problem of r88197 is that it replaces msg._payload by msg.get_payload() which is wrong. New attached patch mailbox.patch	keeps msg._payload unchanged, but don't call _has_surrogates() (do nothing) if msg._payload is None. This patch has no test, I'm unable to write a test for this case (directly with the email API).

----------
Added file: http://bugs.python.org/file20530/BytesGenerator_handle_text.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9124>
_______________________________________


More information about the Python-bugs-list mailing list