[Email-SIG] email package status in 3.X?
R. David Murray
rdmurray at bitdance.com
Mon May 10 21:21:42 CEST 2010
On Mon, 10 May 2010 14:02:46 -0400, lutz at rmi.net wrote:
> I realize everybody on this list probably knows this already,
> but email in 3.X not only doesn't support the Unicode/bytes
> dichotomy, it was also broken by it. Beyond the pre-parse
> decode issue, its mail text generation really only works for
> all-text mails. Generating text of an email with any sort of
> binary part doesn't work at all now, because the base64 text
> is still bytes, and the Generator expects str. I've coded a
There's an open bug report for this, and it can be addressed with a fix
in the current package (I just bumped the prio to critical to make sure
I get it into the next release).
> custom encoder to pass to MIMEImage that works around this
> by decoding to ASCII, but it's not a great story to have to
> tell the tens of thousands of readers of this book, many of
> whom will be evaluating 3.X in general.
> It's unfortunate, IMHO, that the powers that be chose to ship
> Python 3.0 with a badly broken email package. This probably
> could have been avoided with a short period of concerted effort
> by pydev, and I think it does leave 3.X with a bit of a black
> eye. Two years later, the 3.0 I/O speed issue has been fixed
> but this has not? Odd, that. I'm also not convinced that
Well, speeding up IO was a matter of rewriting an already designed and
implemented python-based package in C, and volunteers with an interest
stepped forward to do that job. Fixing email involves designing and
implementing a new version of email that can handle the separation
between bytes and unicode correctly. (You will note that the 2.x package
did not do so, and that fact is the source of many still-open bugs.)
Unfortunately, none of the email experts involved in Python development
had any time available to do this work, and until I expressed interest
at the end of last year no new volunteers had come forward to write code.
> poplib, smptlib, or ftplib in 3.X completely address the brave
> new Unicode world either, but time and 3.X users will tell.
I am afraid that you are correct. We've found an fixed a few things,
but I'm pretty sure there are more waiting to be found.
If you have time to file bugs for anything you come across, that would
be most helpful.
> Then again, such is life in realistic software development.
Particularly in the primarily-volunteer open source world.
> At the end of the day, I suppose this isn't a bad lesson for
> readers to learn. As for funding, I don't have any specific
> ideas, but this project should clearly be a top priority.
Thanks. I've forwarded your note to the PSF board, as a reminder of
how important this is ;)
R. David Murray www.bitdance.com
More information about the Email-SIG