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

2012-02-24 Thread Stefan Krah
Stefan Krah 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: -> invalid stage: patch revie

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

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

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

2011-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please also see issue5231. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-08-23 Thread Stefan Krah
Stefan Krah 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 would be correct. I've asked

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

2011-08-22 Thread Antoine Pitrou
Antoine Pitrou 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

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

2011-08-22 Thread Stefan Krah
Stefan Krah 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 actually stored. An exporter shou

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

2011-08-22 Thread Stefan Krah
New submission from Stefan Krah : 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', [1,2,3,4,5]) >>> m =