Skip to content

Incorporate timeoutsocket.py into core #35084

Closed

Description

@smontanaro
BPO 457114
Nosy @gvanrossum, @freddrake, @smontanaro

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 = 'https://github.com/gvanrossum'
closed_at = <Date 2002-06-17.14:59:26.000>
created_at = <Date 2001-08-31.05:48:27.000>
labels = ['type-feature', 'library']
title = 'Incorporate timeoutsocket.py into core'
updated_at = <Date 2002-06-17.14:59:26.000>
user = 'https://github.com/smontanaro'

bugs.python.org fields:

activity = <Date 2002-06-17.14:59:26.000>
actor = 'gvanrossum'
assignee = 'gvanrossum'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2001-08-31.05:48:27.000>
creator = 'skip.montanaro'
dependencies = []
files = []
hgrepos = []
issue_num = 457114
keywords = []
message_count = 11.0
messages = ['6285', '6286', '6287', '6288', '6289', '6290', '6291', '6292', '6293', '6294', '6295']
nosy_count = 4.0
nosy_names = ['gvanrossum', 'fdrake', 'skip.montanaro', 'mgilfix']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue457114'
versions = []

Activity

  1. smontanaro commented on Aug 31, 2001

    @smontanaro
    ContributorAuthor

    I was responding to a question on c.l.py earlier about
    urllib hanging and was reminded of Tim O'Malley's
    timeoutsocket.py. It's a shim above socket that allows
    you to set timeouts on any TCP connections. Back in
    January, Jeff Bauer suggested in c.l.py that it be
    included in the core. I agree that it provides useful
    extra functionality beyond the current socket
    implementation and would like it to be considered for
    addition to the standard distribution. Here's a
    pointer:

    http://www.timo-tasi.org/python/timeoutsocket.py
    

    Here's how you use it:

        import timeoutsocket
        import httplib
        timeoutsocket.setDefaultSocketTimeout(20)
        # at this point any sockets created
        # will have a 20-second timeout
        h = httplib.HTTP("www.python.org")

    Pretty simple, huh?

    Skip

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 31, 2001
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancement
    on Aug 31, 2001
  4. gvanrossum commented on Aug 31, 2001

    @gvanrossum
    Member

    Logged In: YES
    user_id=6380

    I like this idea, but don't think this exact implementation
    belongs in the standard library. The hacks deployed to
    "install" the special effect are a bit fragile, e.g.
    consider "import socket as foo"; and they shouldn't be
    necessary.

    When integrated into the standard library, it should
    probably become a standard feature of the socket object.
    Note that on Windows, socket.socket is already a shim on top
    of _socket.socket, so that would be a convenient starting
    point.

    Patch anyone?

  5. gvanrossum commented on Sep 5, 2001

    @gvanrossum
    Member

    Logged In: YES
    user_id=6380

    Skip, want to work on this? If not, please unassign it.

  6. smontanaro commented on Sep 5, 2001

    @smontanaro
    ContributorAuthor

    Logged In: YES
    user_id=44345

    While the offer is tempting, I almost certainly don't
    understand the various bits associated with sockets and
    don't have the time to learn them, so I'm unassigning.
    Hopefully someone else will pick it up for 2.3...

  7. mgilfix commented on Apr 17, 2002

    mgilfixmannequin
    Mannequin

    Logged In: YES
    user_id=116038

    I'd be interested in integrating the two modules if no one
    has tackled this yet. Seems like it would make a cool
    feature.

    I'm a little unclear on where you think the best integration
    (and I'm a little new to the interpreter source :) ) point
    would be - in the python module interface socket.py or the
    lower level c interface socketmodule.c.

  8. gvanrossum commented on Apr 17, 2002

    @gvanrossum
    Member

    Logged In: YES
    user_id=6380

    Bernard Yue is considering to tackle this. See the thread in
    python-dev starting at
    http://mail.python.org/pipermail/python-dev/2002-April/023278.html
    Maybe you two can work on this together?

  9. smontanaro commented on Apr 17, 2002

    @smontanaro
    ContributorAuthor

    Logged In: YES
    user_id=44345

    Check the python-dev mailing list archive for the past few
    days. There is an active thread about this topic.

  10. mgilfix commented on Apr 23, 2002

    mgilfixmannequin
    Mannequin

    Logged In: YES
    user_id=116038

    For the record, I have a patch. I'm coordinating with
    Bernard Yue for some preliminary testing and it'll added
    into the patch tracker shortly.

  11. mgilfix commented on May 12, 2002

    mgilfixmannequin
    Mannequin

    Logged In: YES
    user_id=116038

    A patch for this now exists in the SF tracker: bpo-555085.

  12. freddrake commented on Jun 17, 2002

    @freddrake
    Member

    Logged In: YES
    user_id=3066

    I think this is done and can be closed now, but Guido's been
    working on this and knows the current status.

  13. gvanrossum commented on Jun 17, 2002

    @gvanrossum
    Member

    Logged In: YES
    user_id=6380

    Closing. Further discussion at the corresponding patch.

  14. transferred this issue fromon Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions