[Email-SIG] Proposed Enhanced MIME Handling API

R. David Murray rdmurray at bitdance.com
Sat Aug 31 05:35:28 CEST 2013


No response means nobody objects, right? :)  I did talk with Barry on IRC,
and he indicated he didn't have any problems with the overall design,
but had no time to do a detailed review.

I've completed the implementation.  Some details changed based on
how things actually worked when writing (test) code using the API.
The overall scheme is as indicated in my proposal.

However, I've decided to drop the file manager and the object manager,
and only provide the raw data manager.  The raw data manager provides the
same capabilities as the base package, but using the new API.  (Which I
think is more convenient and more consistent, but then I would :)
Any smarter content managers should probably be tried out on PyPI first,
before deciding what if anything is worthwhile including in the stdlib.

I've posted the code in two forms:  as a set of three layered patches:

    http://bugs.python.org/issue18785   get_body, iter_attachments
    http://bugs.python.org/issue18860   get_content, set_content, ContentManager
    http://bugs.python.org/issue18890   raw_data_manager

and as one master patch:

    http://bugs.python.org/issue18891

It would be great if I could get some review.  I would really like to
check this in before alpha2.  I'll post to python-dev as well, since
everyone here seems to be busy :)

As I said on the master patch issue above, from my point of view I believe
this completes the email6 API.  There is still a bunch of work to do,
including some specialized header support, rewriting some of the yuckier
parts (read: the header folder), and fixing all of the XXX comments I
left scattered around.  But I think the bulk of the project is done.

--David


More information about the Email-SIG mailing list