Thanks very much for your reply.

I'm probably going to have to go ahead and finish the book
with the email package as it is now, and include a lot of 
caveats about the problems that a new version may fix in the 
future.  I can also post updated example code if/when possible.

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 
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 
poplib, smptlib, or ftplib in 3.X completely address the brave
new Unicode world either, but time and 3.X users will tell.

Then again, such is life in realistic software development.
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 again,
--Mark Lutz



-----Original Message-----
>From: "R. David Murray" <rdmur...@bitdance.com>
>Sent: May 9, 2010 5:31 PM
>To: l...@rmi.net
>Cc: email-sig@python.org
>Subject: Re: [Email-SIG] email package status in 3.X?
>
>On Fri, 07 May 2010 07:15:19 -0400, l...@rmi.net wrote:
>> --What's the current ETA on a new version of the email parser
>> which handles byte strings?  The web suggests it might be 3.2, 
>> 3.3, or even 3.4.  It seems to still be in early stages.
>
>My best guess at this point (it's an informed guess, but still very much
>a guess) is that email6 will be available in 3.3, and I am hoping there
>will be a pypi package available for testing it under 3.1/3.2 some time
>before the end of this year.
>
>> --How backward compatible will the new email be?  I'm assuming
>> it will handle bytes but be otherwise very similar, but 3.x set
>> quite a precedent for changes, and changes break books.
>
>Sorry to be the bearer of bad news from your point of view, but there
>are indeed likely to be a number of fairly significant changes.  The plan
>is to provide a backward compatibility layer, but that probably doesn't
>help you much since you'd presumably rather discuss the "official" API.
>
>> Any updates on this would be appreciated; for better or worse, 
>> email is a major dependency for one of the flagship Python books
>> out there.  Since postponing the update probably isn't an option,
>> I'm leaning towards decoding per a user-configurable default 
>> (latin1 or utf8?) for now, but that's less than ideal.
>
>Email is a major dependency for a number of things, and IMO is perhaps
>the biggest thing blocking Python3 adoption that the Python development
>community has any control over.  Unfortunately there is currently a
>distinct lack of volunteer time to work on it.
>
>Several of us are working on ways to support and speed up email6
>development.  There is a GSoC student who will be doing some work,
>with me as mentor, and I am hoping to get funding to be able to spend
>a significant number of hours on the package on a contract-programming
>basis as well.  There are structures the PSF needs to put in place before
>I can do fundraising for that, however.  If you know anyone who might
>want to just pay me for it straight out, let me know :)
>
>As for what you do *now*...unfortunately I don't know of any answer that
>works, otherwise we'd have implemented it.
>
>--
>R. David Murray                                      www.bitdance.com

_______________________________________________
Email-SIG mailing list
Email-SIG@python.org
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to