Re: email6 and Python 3.3
Barry Warsaw <[email protected]> Mon, 28 Feb 2011 15:48:29 -0500
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Organization | Damn Crazy Followers of the Horn |
| Message-ID | <[email protected]> |
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
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJNbAoeAAoJEBJutWOnSwa/K1MQAKanC9le7vfXhGVV9Xopocf4 CK2nlN5AZU7Or8EHVKjaEFh7Sz+NLbsXgWv2jWj4v0+sXCp9OYgB45Yrd1oYk5C/ WiSVTJrwhOUYJjxDt6SBH9rWJm/MjmJtXGhkTo+1E9F7vZjt6OnyZlL3rsXvA4YG RLEuSa3tHUK8WuPE5lRaYrsfGicxzf5B0hj+d27ESJuk/YSLejB0/LRUsIZXfTFi iNUL5EI29Nnpm+kIr7lV7/bcaJzAQidqOcIvzEUzI+nNkSwpWOZ37SkJnyAbmjHo 0m+LE6L/pfaa/SiMvWsFxlnqupvB+Y8aR1lp+ggYcryaBMqI7bSDtY8UE1xqzsiL SocPszXjdS7g4yZFQuZTNPhYyf2kzcmg3nP+xeTYJYUhG8qj7lMJolzNxWINYdjb AL37jF6hjn+a7BQrILZEmMwxbd0cslHOmeSdHdhOz7H383qMDPFTFYyRnxBDVCOp VZCr1a5rUhOzyg6yJnUWHls2b0R532uNj3RcBt+A1gzgSuCwDC9OAAKsB0+U90i1 QVZyAARtSBQtAyy2S+Vljz5Od6gTsRe+TQ7q5qTEPj6aylC2XZrov47i3+AUwA0L My8ddAYN8HHUabyuW1A6OU7oWWnRjzuhOvsOnzfhKIgi9q+gYWFBg41dntGo1pOf M724He/Sfko89Psu/FID =lLAz -----END PGP SIGNATURE-----