[issue11116] mailbox and email errors
R. David Murray
report at bugs.python.org
Thu Feb 10 21:55:54 CET 2011
R. David Murray <rdmurray at bitdance.com> added the comment:
Upon reflection I don't think my suggested email API change is a good one. Currently it is possible to create a Message using non-ASCII headers and manipulate that message. The fact that you can't serialize that message is, really, a bug: one can and I think should assume utf-8 as the default encoding when serializing a message.
So rejecting non-ASCII strings in mailbox may also be a questionable decision, but since accepting string at all is really a legacy API (one should use a Message or a binary string), I think it is OK to leave it. (Why should one not use string for input to mailbox? Because the reason to use string is to avoid going through Message, but if your message includes non-ASCII it would have to be processed through the bug-fixed Message anyway to serialize it correctly...so you might as well just use Message for input to mailbox).
I hope to have a patch for the mailbox-corruption-if-traceback error soon (before the weekend).
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list