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

socket.recv_into doesn't support a memoryview as an argument #52351

Closed
MattGattis mannequin opened this issue Mar 10, 2010 · 4 comments
Closed

socket.recv_into doesn't support a memoryview as an argument #52351

MattGattis mannequin opened this issue Mar 10, 2010 · 4 comments
Assignees
Labels
topic-IO type-feature A feature request or enhancement

Comments

@MattGattis
Copy link
Mannequin

MattGattis mannequin commented Mar 10, 2010

BPO 8104
Nosy @pitrou
Files
  • recvinto.patch
  • 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/pitrou'
    closed_at = <Date 2010-03-17.22:51:09.708>
    created_at = <Date 2010-03-10.00:29:58.389>
    labels = ['type-feature', 'expert-IO']
    title = "socket.recv_into doesn't support a memoryview as an argument"
    updated_at = <Date 2010-03-17.22:51:09.707>
    user = 'https://bugs.python.org/MattGattis'

    bugs.python.org fields:

    activity = <Date 2010-03-17.22:51:09.707>
    actor = 'pitrou'
    assignee = 'pitrou'
    closed = True
    closed_date = <Date 2010-03-17.22:51:09.708>
    closer = 'pitrou'
    components = ['IO']
    creation = <Date 2010-03-10.00:29:58.389>
    creator = 'Matt.Gattis'
    dependencies = []
    files = ['16529']
    hgrepos = []
    issue_num = 8104
    keywords = ['patch']
    message_count = 4.0
    messages = ['100773', '100941', '100953', '101246']
    nosy_count = 2.0
    nosy_names = ['pitrou', 'Matt.Gattis']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue8104'
    versions = ['Python 2.7']

    @MattGattis
    Copy link
    Mannequin Author

    MattGattis mannequin commented Mar 10, 2010

    >>> view = memoryview(bytearray(bufsize))
    >>> while len(view):
    ...    view = view[sock.recv_into(view,1024):]
    ...
    Traceback (most recent call last):
      File "<stdin>", line 2, in <module>
    TypeError: recv_into() argument 1 must be pinned buffer, not memoryview

    @MattGattis MattGattis mannequin added the topic-IO label Mar 10, 2010
    @pitrou
    Copy link
    Member

    pitrou commented Mar 12, 2010

    I suppose recvfrom_into() should also be converted.

    @pitrou
    Copy link
    Member

    pitrou commented Mar 12, 2010

    Here is a patch.

    @pitrou pitrou added the type-feature A feature request or enhancement label Mar 12, 2010
    @pitrou
    Copy link
    Member

    pitrou commented Mar 17, 2010

    Committed in trunk, and additional tests ported to py3k.

    @pitrou pitrou closed this as completed Mar 17, 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
    topic-IO type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant