recv_into(bytearray) complains about a "pinned buffer"

Antoine Pitrou solipsis at
Mon Feb 1 01:04:57 CET 2010

Hello Andrew,

> I don't even know what a "pinned buffer" means, and searching
> isn't helpful.
> Using a bytearray in Python 3.1.1 *does* work:
> [...]

Agreed, the error message is cryptic.
The problem is that socket.recv_into() in 2.6 doesn't recognize the new 
buffer API which is needed to accept bytearray objects. 
(it does in 3.1, because the old buffer API doesn't exist anymore there)

You could open an issue on the bug tracker for this.

Thank you


More information about the Python-list mailing list