This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: memoryview of mmap object not working in 2.7
Type: Stage:
Components: Extension Modules, IO Versions: Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Matt.Gattis, pitrou
Priority: normal Keywords:

Created on 2010-07-12 02:46 by Matt.Gattis, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg110063 - (view) Author: Matt Gattis (Matt.Gattis) Date: 2010-07-12 02:46
This code works in 3.1.2 but not in 2.7:

>>> import mmap
>>> m = mmap.mmap(-1,20)
>>> v = memoryview(m)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot make memory view because object does not have the buffer interface
msg110081 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-12 11:27
True, not all modules in 2.7 have converted to support the new buffer interface (which memoryview() requires, as opposed to the "old" buffer interface used by buffer()).
Unfortunately, it's probably too late to care about this now that the 2.7 branch is in bugfix mode.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53475
2010-07-12 11:27:30pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg110081

resolution: wont fix
2010-07-12 02:46:17Matt.Gattiscreate