[Python-Dev] email package status in 3.X

Bill Janssen janssen at parc.com
Thu Jun 17 20:11:22 CEST 2010


Nick Coghlan <ncoghlan at gmail.com> wrote:

> My personal perspective is that a lot of that code was likely already
> broken in hard to detect ways when dealing with mixed encodings -
> releasing 3.x just made the associated errors significantly easier to
> detect.

I have to agree with this, and not just about encodings.  I think much
of the stdlib code dealing with all aspects of HTTP (urllib and the http
package which now includes cgi) is kind of shaky.  And it affects
(infects) other parts of the stdlib, too; sockets are hacked to support
the read-after-close paradigm that httplib uses, for instance.  Which
means that SSL and other socket-using code also has to support it, etc.
Some of this was cleaned up in the move to 3.x, but more work needs to
be done.  Cudos to the folks working on httplib2
(http://code.google.com/p/httplib2/) and WSGI.

There's a related meta-issue having to do with antique protocols.  FTP,
for instance, was designed when the Internet had only 19 nodes connected
together with custom-built refrigerator-sized routers.  A very early
experiment in application protocols.  It does a few odd things that
we've since learned to be inefficient/unwise/unnecessary.  Does it make
sense that Python support every part of it?  On the other hand, it was
fairly static when the Python support was added (unlike HTTP, which was
under very active development!) so that module is pretty robust.

Bill


More information about the Python-Dev mailing list