Skip to content

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

Closed

Description

@MattGattis
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']

    Activity

    1. MattGattis commented on Mar 10, 2010

      MattGattismannequin
      MannequinAuthor
      >>> 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
    2. pitrou commented on Mar 12, 2010

      @pitrou
      Member

      I suppose recvfrom_into() should also be converted.

    3. pitrou commented on Mar 12, 2010

      @pitrou
      Member

      Here is a patch.

    4. added
      type-feature
      on Mar 12, 2010
    5. pitrou commented on Mar 17, 2010

      @pitrou
      Member

      Committed in trunk, and additional tests ported to py3k.

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

    Metadata

    Metadata

    Assignees

    Labels

    topic-IOtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions