[Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

Guido van Rossum guido at python.org
Tue Mar 3 23:20:13 CET 2009

On Tue, Mar 3, 2009 at 1:17 PM,  <glyph at divmod.com> wrote:
> On 08:46 pm, guido at python.org wrote:
>> This seems to be the crux of the problem with asyncore, ever since it
>> was added to the stdlib -- there's no real API, so every change
>> potentially breaks something. I wish we could start over with a proper
>> design under a new name.
> Might I suggest "reactor"... or possibly "twisted", as that new name? ;-)
> (Sorry, I was trying to avoid this thread, but that was an opening I could
> drive a truck through).
> In all seriousness, I seem to recall that Thomas Wouters was interested in
> doing integrating some portion of Twisted core into the standard library as
> of last PyCon.  I mention him specifically by name in the hopes that it will
> jog his memory.
> At the very least, this might serve as a basis for an abstract API for
> asyncore:
> http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.interfaces.IProtocol.html

I hope we have learned from asyncore that a future-proof and maximally
flexible design of such an API is not easy. This is one of those cases
where I believe thinking hard up front will really pay off. In this
case I would recommend going through a full-blown PEP process before
committing to an API, to avoid making the same mistake twice. (I don't
mean this as a dig at Twisted, just as an observation about this
particular design problem. If Twisted solves all the problems already,
writing the PEP should be easy.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list