[issue10211] BufferObject doesn't support new buffer interface
report at bugs.python.org
Wed Oct 27 19:08:30 CEST 2010
Marc-Andre Lemburg <mal at egenix.com> added the comment:
The memoryview object was added to simplify porting applications to Python3. If that backport is incomplete in the sense that the memoryview object is not compatible with the standard Python2 object for such memory views, then I'd consider that a bug.
Without compatibility to the buffer objects, there's no way to make other Python2 buffer interface compatible object compatible to memoryviews.
Alternatively, the Python2 memoryview object implementation could also accept objects with the old buffer interface, much like "s*" does.
Note that the patch needs to check the buffer flags - writing to such buffers is not allowed.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list