[Python-Dev] Patch making the current email package (mostly) support bytes (original) (raw)
R. David Murray rdmurray at bitdance.com
Fri Oct 8 19:09:12 CEST 2010
- Previous message: [Python-Dev] Patch making the current email package (mostly) support bytes
- Next message: [Python-Dev] Patch making the current email package (mostly) support bytes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 09 Oct 2010 01:06:29 +0900, "Stephen J. Turnbull" <stephen at xemacs.org> wrote:
That mess is entirely unnecessary in Python 3. Text and wire format can be easily distinguished with three different representations of email: Unicode for the conceptual RFC 822 layer (of course this is an extension, because RFC 822 itself is strictly limited to the ASCII subset), bytes for wire format, and Message objects for modern structured mail (including MIME, etc).
If email6 is reengineered with that kind of structure, then you should be able to dispense with almost all of the raft of defense, because the email module will give you well-behaved Message objects, whose text components (including the header) are well-behaved character strings that mix seamlessly with other character strings.
That engineering is pretty much what we are looking at, although in practice I think you have to hang wire-format and text-format bits off of appropriate places in the model in order to keep everything properly coordinated.
Maybe even in email5 ....
I suspect that's pushing it. Patches happily accepted, though :)
-- R. David Murray www.bitdance.com
- Previous message: [Python-Dev] Patch making the current email package (mostly) support bytes
- Next message: [Python-Dev] Patch making the current email package (mostly) support bytes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]