[issue4661] email.parser: impossible to read messages encoded in a different encoding

Antoine Pitrou report at bugs.python.org
Fri Oct 8 14:00:22 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> Generator converts 8bit bodies into 7bit bodies by applying an
> appropriate 7bit CTE.  The reason it does this is that the output of
> Generator will often be passed to some other Python library function
> (most often smtplib) that can only handle ASCII unicode input.

What do you mean, ASCII *unicode* input? Any low-level network library
should accept bytes when arbitrary data is possible.

Enforcing 7-bit means things like binary attachments can grow larger for
no real reason. Also, raw message bodies become less readable (which
obviously is very minor issue).

> The statement about string input and output is a description of email
> *5.0*, the existing email package in 3.0 and 3.1, before my patch.
> The differences between 4.0 and 5.0 were never previously added to the
> docs, so I had to add them in order to then describe the differences
> between 5.0 and 5.1.

Ah, my bad. Sorry.

----------

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


More information about the Python-bugs-list mailing list