[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12817 ___ ___

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2012-02-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The current interpretation in the PEP-3118 repo is that a request without PyBUF_FORMAT means implicit cast to unsigned bytes. This makes the behavior of PyObject_AsWriteBuffer() correct, so I'm closing this. -- resolution: -

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2011-08-23 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I've come to think that PyBUF_SIMPLE requests were really intended as a way of casting contiguous buffers with arbitrary formats to one-dimensional buffers of unsigned bytes. At least that is what Numpy does. Then test_multiprocessing

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2011-08-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Please also see issue5231. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12817 ___ ___

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2011-08-22 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: Hello, in my private repo I've changed memoryview's getbufferproc to be PEP-3118 compliant. test_multiprocessing does the equivalent of the following sequence, which is not allowed by PEP-3118: import array, io a = array.array('i',

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2011-08-22 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Of course, there is another interpretation: [PyBUF_FORMAT] The returned buffer must have true format information if this flag is provided. This would be used when the consumer is going to be checking for what 'kind' of data is

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2011-08-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Antoine, is it correct that io.BytesIO should only be used with bytearray buffers? BytesIO does a copy of the original object, it does not touch the original buffer. -- ___ Python tracker