At 07:54 -0500 2009/04/02, Barry Warsaw wrote: ... >...Here's a rambling of some of my thoughts on things we should do. ...
>* Bytes and string interfaces. This is the trickiest one. I think >that internally, header names and values, and payloads should all be >represented as bytes. But APIs should accept bytes and strings, >converting to bytes on input, and provide APIs to extract information >as either bytes or strings. I've thought about a few ways to do this >cleanly, but haven't found anything I particularly like yet. Remember >that in email in Py2 is horribly broken in its discrimination between >bytes and strings, but Py3 forces us to make a choice (which is a good >thing). AIUI, this or something like it must be done soon, as the email package is broken on 3.x now. >* Clean up the API. Where possible, simple attribute access should be >the norm. Let's get rid of dumb API decisions (like str(msg) >including the Unix-From). Let's fix the whole >get_payload(decode=True) debacle. Let's fix stuff like needing to >specify unicode encodings twice in the same call. Etc. Sounds good. I'd like __setitem__ (msg[hdr] = foo) to act more like a mapping, and not just append new header fields, with .replace_header() and .add_header() folded together as .set_header(). >* Add an external storage API so that messages with huge binary >payloads don't need to be fully stored in memory. > >* Let's target Python 3.1 (coming very soon) if possible, or Python >3.2 if not. We should back port email 6.0 to Python 2.x, though we'll >have to decide how far back we should go (my suggestion: no earlier >than Python 2.5). Python 3.1 should have a working email package, and a simple way for users needing more to get a better replacement (which they'd install as a site-package). I think that a sane split between bytes and string (or string and Unicode on 2.x) is most needed. >* Fix the myriad of bugs in the tracker! Sure, I'm game! We 2.x users would benefit. Again, a place for users to get an "official" current package is needed, as 2.7 is a ways off. -- ____________________________________________________________________ TonyN.:' <mailto:tonynel...@georgeanelson.com> ' <http://www.georgeanelson.com/> _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com