Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-07 Thread Greg Ewing
Bill Janssen wrote: > If you really need a name other than "timeout" (which seems fine to > me), how about "waiting-with-mild-trepidation-timeout"? Something like "response timeout" might be more descriptive. -- Greg ___ Python-Dev mailing list Python-

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-07 Thread Bill Janssen
> > Guido> Since "idel timeout" is not a commonly understood term it would > Guido> be even better if it was explained without using it. > > I think it's commonly understood, but it doesn't mean what the socket > timeout is used for. It's how long a connection can be idle (the client > d

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-07 Thread Adam Olsen
On 3/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 3/6/07, Adam Olsen <[EMAIL PROTECTED]> wrote: > > 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. > > Since

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Bob Ippolito
On 3/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Guido> Since "idel timeout" is not a commonly understood term it would > Guido> be even better if it was explained without using it. > > I think it's commonly understood, but it doesn't mean what the socket > timeout is used for.

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread skip
Bob> What does idle timeout have to do with urllib2 or any IO layer for Bob> that matter? I've only seen it as a very high level server-only Bob> feature... Nothing at all. I believe Adam just applied that term incorrectly to the socket timeout parameter. Skip __

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread skip
Guido> Since "idel timeout" is not a commonly understood term it would Guido> be even better if it was explained without using it. I think it's commonly understood, but it doesn't mean what the socket timeout is used for. It's how long a connection can be idle (the client doesn't make a

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Guido van Rossum
On 3/6/07, Adam Olsen <[EMAIL PROTECTED]> wrote: > 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. Since "idel timeout" is not a commonly understood term it would be even

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Adam Olsen
On 3/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 3/6/07, Adam Olsen <[EMAIL PROTECTED]> 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

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread skip
>> Think of it this way. "Timeout" doesn't mean the whole thing needs to >> be completed in 10 secs. It means that over 10 secs of no activity >> causes it to be aborted. Adam> IOW, It's an idle timeout. Not quite. It's a timeout when you are waiting for some sort of response. If

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Guido van Rossum
On 3/6/07, Adam Olsen <[EMAIL PROTECTED]> wrote: > On 3/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 3/6/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > > > Guido van Rossum wrote: > > > > > > >> - I'll modify urlopen for it to accept a socket_timeout parameter, > > > >> default to Non

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Adam Olsen
On 3/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 3/6/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > > Guido van Rossum wrote: > > > > >> - I'll modify urlopen for it to accept a socket_timeout parameter, > > >> default to None > > > > > > I'd call it timeout. There can't really be much

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Guido van Rossum
On 3/6/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > >> - I'll modify urlopen for it to accept a socket_timeout parameter, > >> default to None > > > > I'd call it timeout. There can't really be much ambiguity can there? > > Yes and no. For example, if I do a > ``urll

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Facundo Batista
Guido van Rossum wrote: >> - I'll modify urlopen for it to accept a socket_timeout parameter, >> default to None > > I'd call it timeout. There can't really be much ambiguity can there? Yes and no. For example, if I do a ``urllib2.urlopen("ftp://ftp.myhome.com.ar/blah.txt";, timeout=10)``, the t

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-05 Thread Guido van Rossum
On 3/5/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > I studied which modifications I need to make into urllib2 to support a > socket timeout. > > - I'll modify urlopen for it to accept a socket_timeout parameter, > default to None I'd call it timeout. There can't really be much ambiguity can th

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-05 Thread skip
Facundo> So, I think that in the name of clarity, I shall first modify Facundo> ftplib and httplib, add socket_timeout where is necessary, and Facundo> then add support to that in the more general urllib2. I own a patch on SF to do that much: http://python.org/sf/723312 Feel fre