[issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout

Pau Aliagas report at bugs.python.org
Tue Apr 8 23:05:00 CEST 2008


New submission from Pau Aliagas <linuxnow at newtral.org>:

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.

----------
components: Library (Lib)
files: urllib2_util.py
messages: 65215
nosy: pau
severity: normal
status: open
title: BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout
type: feature request
versions: Python 2.4, Python 2.5
Added file: http://bugs.python.org/file9988/urllib2_util.py

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2600>
__________________________________


More information about the Python-bugs-list mailing list