Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-27 Thread Facundo Batista
[EMAIL PROTECTED] wrote: > Guido, I looked at urllib2 and quickly gave up. I have no idea how that > code works (where is a lower level library's connection object instantiated, > for example?). I presume with timeouts in the lower level libraries someone > who knows how urllib2 works will be ab

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Brett Cannon
On 2/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Guido> I'm not going to change ftplib.py and all the others. > > >> Also understood. This has, as far as I know, been the response of > >> everybody who has encountered this problem before. > > Martin> You should read you

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Brett Cannon
On 2/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Guido> I'm not going to change ftplib.py and all the others. > > >> Also understood. This has, as far as I know, been the response of > >> everybody who has encountered this problem before. > > Martin> You should read you

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Guido van Rossum
On 2/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Guido, I looked at urllib2 and quickly gave up. I have no idea how that > code works (where is a lower level library's connection object instantiated, > for example?). I presume with timeouts in the lower level libraries someone > who kno

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread skip
Guido> I'm not going to change ftplib.py and all the others. >> Also understood. This has, as far as I know, been the response of >> everybody who has encountered this problem before. Martin> You should read your SF bug list more frequently, then. You are Martin> currently a

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread skip
>> I don't know if feature requests for Roundup are still being >> accepted, but I hope one of its features is that it can remind people >> periodically of the tickets they own. My primary goal in life is not >> to close Python bugs and patches, so I hope people will understand if

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I don't know if feature requests for Roundup are still being accepted, but I > hope one of its features is that it can remind people periodically of the > tickets they own. My primary goal in life is not to close Python bugs and > patches, so I hope people will underst

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread skip
Guido> I'm not going to change ftplib.py and all the others. >> Also understood. This has, as far as I know, been the response of >> everybody who has encountered this problem before. Martin> You should read your SF bug list more frequently, then. You are Martin> currently a

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-10 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Guido> I'm not going to change ftplib.py and all the others. > > Also understood. This has, as far as I know, been the response of everybody > who has encountered this problem before. You should read your SF bug list more frequently, then. You are currently as

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread Guido van Rossum
You're not helping, Skip. Can you spend a minute looking at urllib2 and seeing how the two variants of my proposal (pass to constructor vs. pass to connect()) would impact on it? --Guido On 2/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Guido> Didn't work for me, since my ap is a mu

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread skip
Guido> Didn't work for me, since my ap is a multi-threaded webserver and Guido> I only want one specific type of request to time out. Understood. Guido> I'm not going to change ftplib.py and all the others. Also understood. This has, as far as I know, been the response of everybody

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread Guido van Rossum
On 2/9/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > On Friday 09 February 2007 08:52, [EMAIL PROTECTED] wrote: > > In principle it's probably a fine idea. We should consider if it's > > possible to develop a uniform approach to timeouts for all the libraries > > that use sockets though.

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread Fred L. Drake, Jr.
On Friday 09 February 2007 08:52, [EMAIL PROTECTED] wrote: > In principle it's probably a fine idea. We should consider if it's > possible to develop a uniform approach to timeouts for all the libraries > that use sockets though. Otherwise you run the risk of doing it in > different ways for

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread skip
Guido> I recently needed to access an HTTP URL with a timeout. I ended Guido> up monkey-patching httplib.HTTPConnection so that the connect() Guido> method has an optional second paramer, timeout, defaulting to Guido> None; if not None, a call to settimeout() is added right after

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-09 Thread Martin v. Löwis
Guido van Rossum schrieb: > I recently needed to access an HTTP URL with a timeout. I ended up > monkey-patching httplib.HTTPConnection so that the connect() method > has an optional second paramer, timeout, defaulting to None; if not > None, a call to settimeout() is added right after successful c

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-08 Thread Josiah Carlson
"Guido van Rossum" <[EMAIL PROTECTED]> wrote: > > I recently needed to access an HTTP URL with a timeout. I ended up > monkey-patching httplib.HTTPConnection so that the connect() method > has an optional second paramer, timeout, defaulting to None; if not > None, a call to settimeout() is added

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-08 Thread Raymond Hettinger
[GvR] >I recently needed to access an HTTP URL with a timeout. I ended up > monkey-patching httplib.HTTPConnection so that the connect() method > has an optional second paramer, timeout, defaulting to None; if not > None, a call to settimeout() is added right after successful creation > of the sock

[Python-Dev] Adding timeout option to httplib...connect()

2007-02-08 Thread Guido van Rossum
I recently needed to access an HTTP URL with a timeout. I ended up monkey-patching httplib.HTTPConnection so that the connect() method has an optional second paramer, timeout, defaulting to None; if not None, a call to settimeout() is added right after successful creation of the socket. Does anybo