Issue 8104: socket.recv_into doesn't support a memoryview as an argument (original) (raw)

Issue8104

Created on 2010-03-10 00:29 by Matt.Gattis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
recvinto.patch pitrou,2010-03-12 18:51
Messages (4)
msg100773 - (view) Author: Matt Gattis (Matt.Gattis) Date: 2010-03-10 00:29
>>> view = memoryview(bytearray(bufsize)) >>> while len(view): ... view = view[sock.recv_into(view,1024):] ... Traceback (most recent call last): File "", line 2, in TypeError: recv_into() argument 1 must be pinned buffer, not memoryview
msg100941 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-03-12 16:10
I suppose recvfrom_into() should also be converted.
msg100953 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-03-12 18:51
Here is a patch.
msg101246 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-03-17 22:51
Committed in trunk, and additional tests ported to py3k.
History
Date User Action Args
2022-04-11 14:56:58 admin set github: 52351
2010-03-17 22:51:09 pitrou set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2010-03-12 18:51:20 pitrou set files: + recvinto.patchpriority: normalmessages: + keywords: + patchtype: enhancementstage: patch review
2010-03-12 16:10:16 pitrou set messages: +
2010-03-11 07:47:02 georg.brandl set assignee: pitrounosy: + pitrou
2010-03-10 00:29:58 Matt.Gattis create