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

fromfd() and socketpair() should return wrapped sockets #45893

Closed
ts1 mannequin opened this issue Dec 4, 2007 · 5 comments
Closed

fromfd() and socketpair() should return wrapped sockets #45893

ts1 mannequin opened this issue Dec 4, 2007 · 5 comments
Labels
easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ts1
Copy link
Mannequin

ts1 mannequin commented Dec 4, 2007

BPO 1552
Nosy @birkenfeld, @pitrou, @giampaolo
Files
  • fromfd_sockpair.patch
  • 1552_test_socket.diff
  • 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 2010-09-14.18:00:27.854>
    created_at = <Date 2007-12-04.03:38:15.541>
    labels = ['easy', 'type-feature', 'library']
    title = 'fromfd() and socketpair() should return wrapped sockets'
    updated_at = <Date 2010-09-14.18:00:27.852>
    user = 'https://bugs.python.org/ts1'

    bugs.python.org fields:

    activity = <Date 2010-09-14.18:00:27.852>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-14.18:00:27.854>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2007-12-04.03:38:15.541>
    creator = 'ts1'
    dependencies = []
    files = ['8870', '8872']
    hgrepos = []
    issue_num = 1552
    keywords = ['patch', 'easy']
    message_count = 5.0
    messages = ['58172', '58186', '110593', '114969', '116415']
    nosy_count = 6.0
    nosy_names = ['georg.brandl', 'pitrou', 'therve', 'giampaolo.rodola', 'ts1', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1552'
    versions = ['Python 3.2']

    @ts1
    Copy link
    Mannequin Author

    ts1 mannequin commented Dec 4, 2007

    socket() returns socket object wrapped by Python code, but fromfd() and
    socketpair() return raw object. This results in behaviour differences
    between sockets.
    Attached patch fixes it.

    @ts1 ts1 mannequin added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir labels Dec 4, 2007
    @therve
    Copy link
    Mannequin

    therve mannequin commented Dec 4, 2007

    This is a nice enhancement. I attach a quick patch to add tests for that.

    @tiran tiran added the easy label Jan 20, 2008
    @devdanzin devdanzin mannequin added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels May 12, 2009
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 17, 2010

    The attached patch files are small and look ok to me. Could someone with socket experience please give a yes or no.

    @birkenfeld
    Copy link
    Member

    fromfd is already taken care of in 3.2. Otherwise, this looks like a good fix once updated to trunk.

    @pitrou
    Copy link
    Member

    pitrou commented Sep 14, 2010

    socketpair() was fixed in 3.x in r84813.

    @pitrou pitrou closed this as completed Sep 14, 2010
    @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
    easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants