[Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Jim Fulton
Yesterday, I needed to make a web request in a program (actually a test) that could block indefinately, so I needed to set a socket timeout. Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set the timeout on the sockets they use. I ended up having to roll my own code to

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Jeremy Hylton
Yup. I just went through a similar exercise with urllib2. It wasn't too hard to plumb through a different HTTPHandler that set the timeout, but it would be much nicer as a default option. It seems like a 30 minute project; might fit in an odds and ends sprint. Jeremy On 12/22/05, Jim Fulton

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Steve Holden
Jim Fulton wrote: Yesterday, I needed to make a web request in a program (actually a test) that could block indefinately, so I needed to set a socket timeout. Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set the timeout on the sockets they use. I ended up having

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Charles Cazabon
Steve Holden [EMAIL PROTECTED] wrote: Jim Fulton wrote: Yesterday, I needed to make a web request in a program (actually a test) that could block indefinately, so I needed to set a socket timeout. Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set the timeout

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Jim Fulton
Steve Holden wrote: Jim Fulton wrote: Yesterday, I needed to make a web request in a program (actually a test) that could block indefinately, so I needed to set a socket timeout. Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set the timeout on the sockets they use.

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Akradiusz Miskiewicz
Charles Cazabon wrote: It might also be nice if the modules that rely on blocking mode being set on sockets (basically anything using socket.ssl()) actually explicitly set that first. Right now, if you do socket.setdefaulttimeout() to a non-None value and then try to use anything that does