[Email-SIG] Hello

Barry Warsaw barry at python.org
Tue Mar 31 05:03:57 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Commenting on parts of your message, since I haven't looked at 5610 yet.

On Mar 30, 2009, at 5:46 PM, Tony Nelson wrote:

> A worthy issue.  Hopefully header parsing and generation can be  
> cleaned up
> more befre 2.7/3.1 so that proper RFC2822 2.2.3 folding can be the  
> norm.
> For example, unstructured header fields such as Subject: have  
> whitespace as
> part of the unstructured token, and structured fields can skip  
> whitespace,
> so leading whitespace should not be stripped by
> FeedParser._parse_headers().  This would help with idempotency.

While I completely agree with you here, I don't think it will be  
possible to fix this in Python 2.7.  That doesn't mean that we can't  
provide a working email package for Python 2.x though.

I think doing structured folding will require API changes and I think  
I know the API I want.  I'm trying to get some cycles to write about  
it or create some working code.

>> My plan for the email package is:
>>
>> * Fix what we can for Python 2.7 but be very conservative with back
>> ports to 2.6
>> * Ignore 3.0
>> * Work on a new API so that we can actually fix the horrible
>> brokenness of email in Python 3.
>
> Hmm, I haven't used Python 3 yet, and didn't know about that.  I  
> suppose it
> is due to bytes/unicode confusion?

Yes.  The email package has a really broken notion of bytes vs. text.   
Grep for raw-unicode-escape for the brain-hurty.  Fixing this too  
really requires an API change, and again I've talked with folks so I  
think I know where to go with this.  I can haz free hacking cycles?

> There should be an "obvious" place for users to get a current email  
> package
> suitable for at least the last few Python 2.x, at least if it starts
> getting more love again.  I don't know quite where that should be,  
> whether
> a SourceForge (or similar) page, a listing on PyPI, both, or what.   
> Just
> something simpler than a SVN checkout.

We've done standalone email package releases in the past, and I think  
we'll do the same with the new version, distributing it on the  
cheeseshop.  We'll either do this out of the 3.1 tree or from the  
sandbox.  The tricky part will be dealing with the Python 2 back  
porting.  Hopefully we'll be able to use the mythical 3to2 tool that  
folks are starting to talk about/work on, otherwise we'll have to  
manually maintain a Python 2 port.  I definitely think it's better to  
work the details out for Py3 first though; it'll force us to be  
explicit about bytes vs. strings, so we won't fall into the sloppiness  
of the current code.

Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSdGIHnEjvBPtnXfVAQLPywQAjRs5JtxREGVyuG+eAJhh29ICrbMaucrz
/nVi8GBVTYzJWYJkzvvvc31VMY28xNLWPuO2uO10eVQd+zYfsa2oXOOXvvXM8PrH
taP+i1xzQ2b8ANbbehcBPosksOKCU8hpiMes7h43U9NuBGtf8NBaU50diT/N3jua
VQopywOTfEw=
=pmfa
-----END PGP SIGNATURE-----


More information about the Email-SIG mailing list