classification
Title: mmap enhancement request
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ndbecker, pitrou
Priority: normal Keywords:

Created on 2009-01-08 20:18 by ndbecker, last changed 2010-08-09 03:13 by terry.reedy.

Messages (2)
msg79433 - (view) Author: (ndbecker) Date: 2009-01-08 20:18
I'd like to suggest some improvements from mmap

1) mmap assign to slice only accepts a string.  This is unfortunate,
because AFAIK a string can only be created by copying data, and this is
wasteful for large data transfers.  mmap should accept any object
supporting buffer protocol as well as string.

2) buffer (mmap_obj) gives a read_only buffer.  There should be a way to
make this read_write.  I suggest 'as_buffer' member.

3) mmap_obj does not support weak ref.  This is needed for proper
lifetime management using boost::python
msg79435 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-01-08 20:40
As for 2), the buffer() function is deprecated and is replaced in 3.0 by
new object called memoryview() (together with a revamped internal API
for taking and releasing buffers).
History
Date User Action Args
2010-08-09 03:13:05terry.reedysetstage: test needed
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-01-08 20:40:11pitrousetpriority: normal
nosy: + pitrou
messages: + msg79435
versions: + Python 3.1, Python 2.7, - Python 2.5
2009-01-08 20:18:12ndbeckercreate