[Python-Dev] State of PEP-3118 (memoryview part)

Stefan Krah stefan at bytereef.org
Sun Feb 26 14:27:21 CET 2012


State of PEP-3118 (memoryview part)

Hello,

In Python 3.3 most issues with the memoryview object have been fixed
in a recent commit (3f9b3b6f7ff0). Many features have been added, see:

http://docs.python.org/dev/whatsnew/3.3.html


The underlying problems with memoryview were intricate and required
a long discussion (issue #10181) that led to a complete rewrite
of memoryobject.c.


We have several options with regard to 2.7 and 3.2:

  1) Won't fix.

  2) Backport the changes and disable as much of the new functionality
     as possible.

  3) Backport all of it (this would be the least amount of work and
     could be done relatively quickly).

  4) Nick suggested another option: put a module with the new functionality
     on PyPI. This would be quite a bit of work, and personally I don't
     have time for that.


Options 2) and 3) would ideally entail one backwards incompatible
bugfix: In 2.7 and 3.2 assignment to a memoryview with format 'B'
rejects integers but accepts byte objects, but according to the
struct syntax mandated by the PEP it should be the other way round.


It would be nice to get some opinions and ideas, especially of course
from the release managers.



Stefan Krah





More information about the Python-Dev mailing list