[Python-Dev] Adding socket timeout to urllib2
rhamph at gmail.com
Wed Mar 7 03:21:24 CET 2007
On 3/6/07, Guido van Rossum <guido at python.org> wrote:
> On 3/6/07, Adam Olsen <rhamph at gmail.com> wrote:
> > IOW, It's an idle timeout.
> That's not in wikipedia. :-)
I know, I checked before posting. ;)
> It's the only timeout that is available to us, realistically; the
> socket module calls it timeout everywhere. So I think that should be a
> good name for it. The argument name doesn't need to server as complete
> documentation. I don't expect we'll ever see another kind of timeout
> added to this same API, and if we do, we'll just have to pick a
> different name for it. ;-)
On 3/6/07, skip at pobox.com <skip at pobox.com> wrote:
> Not quite. It's a timeout when you are waiting for some sort of response.
> If you make a connection to an ftp server to send files the connection
> shouldn't be aborted if you take more than 10 seconds to prepare the file
> you want to upload. OTOH, if you send the file and don't get an
> acknowledgement back for 10 seconds, then you get a TimeoutError.
I think calling it "timeout" in the API is fine. The documentation
can then clarify that it's an idle timeout, except it only applies
when blocked in a network operation.
Adam Olsen, aka Rhamphoryncus
More information about the Python-Dev