classification
Title: BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, orsenthil, pau, pitrou
Priority: normal Keywords:

Created on 2008-04-08 21:04 by pau, last changed 2012-09-25 13:29 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
urllib2_util.py pau, 2008-04-08 21:04
Messages (3)
msg65215 - (view) Author: Pau Aliagas (pau) Date: 2008-04-08 21:04
I wanted to use urllib2 with something as usual as binding to a given
network interface and it was incredibly complex. I also did not like the
usual propodes solution to timeout the connections: set the global
socket timeour. I needed a different timeout for each connection.

So I took my time, I learnt about httplib and urllib2 and made a patch
to enhance both libraries.

BindingHTTPConnectionWithTimeout extends HTTPConection with supports
timeouts and a binding address.

BindingHTTPHandlerWithTimeout extends HTTPHandler and basically uses the
new http class provided.

The patch is really simple and would make a great addition to the
standard library. I've tried to follow the style amd copied similar
methods, giving the due credits.

I hope you find it useful and consider it for inclusion.
msg109731 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-09 13:21
Pau, this isn't likely to be progressed unless you can provide a unit test and possibly doc patches as well.
msg171271 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-09-25 13:29
HTTPConnection now supports timeout and source_address parameters, so this is really out of date. Thanks for reporting, though!

(see http://docs.python.org/dev/library/http.client.html#http.client.HTTPConnection)
History
Date User Action Args
2012-09-25 13:29:09pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg171271

resolution: out of date
stage: test needed -> resolved
2010-07-09 13:21:00BreamoreBoysetnosy: + BreamoreBoy

messages: + msg109731
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-02-12 18:29:49ajaksu2setnosy: + orsenthil
stage: test needed
versions: + Python 3.1, Python 2.7, - Python 2.6
2008-04-12 15:53:43ajaksu2setversions: + Python 2.6, - Python 2.5, Python 2.4
2008-04-08 21:04:59paucreate