Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout #46852

Closed
pau mannequin opened this issue Apr 8, 2008 · 3 comments
Closed

BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout #46852

pau mannequin opened this issue Apr 8, 2008 · 3 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pau
Copy link
Mannequin

pau mannequin commented Apr 8, 2008

BPO 2600
Nosy @orsenthil, @pitrou
Files
  • urllib2_util.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-09-25.13:29:09.631>
    created_at = <Date 2008-04-08.21:04:59.022>
    labels = ['type-feature', 'library']
    title = 'BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout'
    updated_at = <Date 2012-09-25.13:29:09.629>
    user = 'https://bugs.python.org/pau'

    bugs.python.org fields:

    activity = <Date 2012-09-25.13:29:09.629>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-09-25.13:29:09.631>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2008-04-08.21:04:59.022>
    creator = 'pau'
    dependencies = []
    files = ['9988']
    hgrepos = []
    issue_num = 2600
    keywords = []
    message_count = 3.0
    messages = ['65215', '109731', '171271']
    nosy_count = 4.0
    nosy_names = ['orsenthil', 'pitrou', 'pau', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue2600'
    versions = ['Python 3.2']

    @pau
    Copy link
    Mannequin Author

    pau mannequin commented Apr 8, 2008

    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.

    @pau pau mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Apr 8, 2008
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 9, 2010

    Pau, this isn't likely to be progressed unless you can provide a unit test and possibly doc patches as well.

    @pitrou
    Copy link
    Member

    pitrou commented Sep 25, 2012

    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)

    @pitrou pitrou closed this as completed Sep 25, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant