[Email-SIG] email6 and Python 3.3

Barry Warsaw barry at python.org
Mon Feb 28 21:48:29 CET 2011


On Feb 28, 2011, at 03:11 PM, R. David Murray wrote:

>So, we've released Python3.2 with an email package that pretty much works.
>There are some rough edges compared to Python2, mostly having to do with
>what happens when you try to manipulate (as opposed to just transmit
>unchanged) messages with unencoded 8bit characters in their headers.

Let me personally thank you profusely for taking this on and improving the
email package so much in Python 3.2.  I know I'm not alone in saying this was
a difficult task, and I really really appreciate all the work you've done.

>So, here is a plan for moving forward with email6, with the intent
>that whatever part of this is tested and stable will be shipped with
>Python 3.3:

I guess there are two ways to go about it: make email6 backward compatible
(enough <wink>) with email 5.1 to be able to provide it under the same package
namespace in Python 3.3.  I.e. no 'import email6' needed.

Or, have a completely different package hierarchy and do the whole
deprecation dance.  I know *I* hope you don't choose the latter. :)

>There is one tricky bit about this design, and that is that a library
>that doesn't know what kind of Message object it is going to be handed
>(email5 or email6) will have to have code to handle both if it wants to
>retain backward compatibility with Python 3.2.  Obviously the library
>can detect the Message type and branch accordingly; however, there are
>more elegant solutions.  One option would be for email6 to provide
>a wrapper class that exposes an email5-like API when wrapped around
>an email6 Message.

If at all possible, I think a b/c wrapper would be great.  If not feasible, is
there some other definitive marker we can put in email6 Message instances that
could be tested for in a LBYL way?  I wonder if Message should have an
__version__ attribute or something?

Everything else sounds great.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/email-sig/attachments/20110228/b4649cb9/attachment.pgp>


More information about the Email-SIG mailing list