[Twisted-Python] Proposal: changes to reactor.clientTCP

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Jun 19 00:48:47 EDT 2002

From: Glyph Lefkowitz <glyph at twistedmatrix.com>
Subject: Re: [Twisted-Python] Proposal: changes to reactor.clientTCP
Date: Tue, 18 Jun 2002 19:38:46 -0500 (CDT)

> From: Tommi Virtanen <tv at twistedmatrix.com>
> Subject: Re: [Twisted-Python] Proposal: changes to reactor.clientTCP
> Date: 18 Jun 2002 21:12:52 +0300

> > 	Please do not clobber the information given by the
> >         kernel in errno. Translating errno to 2 different failures
> >         is not nice.

> It needs to be clobbered, at least in some sense, for portability.
> Jython does not have errno and win32's support for it is very weak.

Reading this a few hours later, I think my tone was wrong and I was altogether
too brief here. :-).  To rephrase in a more constructive manner:

I believe that it needs to be clobbered, and some information lost, because I
don't see any other way to retain portability.  Also, we're losing information
already, since errno is used to report things that aren't "errors" in the
Twisted worldview (or at least, not errors that the user can deal with
directly).  Jython and win32 both have error-reporting mechanisms; Jython's is
exceptions, win32 is a sort of wacked-out informal errno.  Can you think of a
few primitive errors that we should support, rather than just the 2 types?
(I'd rather use Failure than just integer error codes, personally.)

I think that if we're going to add a new error reporting mechanism we need to
do it carefully so that we don't miss the same kind of information that we did
the last time we architected this API.  (Protocol.connectionLost used to take
an integer error code which was one of these two errors; that was a bad idea,

Thanks for your feedback.  Does anybody have a solution?

 |    <`'>    |  Glyph Lefkowitz: Traveling Sorcerer   |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020618/12fe95f8/attachment.pgp 

More information about the Twisted-Python mailing list