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.

Author meador.inge
Recipients benrg, meador.inge, santoso.wijaya, theller, vstinner
Date 2011-11-10.03:10:48
SpamBayes Score 1.6644451e-09
Marked as misclassified No
Message-id <1320894649.83.0.85326768542.issue11427@psf.upfronthosting.co.za>
In-reply-to
Content
Hmmm... I take back what I said before (not sure what I was thinking), I 
don't think this is a regression.  If this ever did work, it must have 
been a bug.  For one reason, Python byte strings are now immutable.  
Allowing their memory to be indirectly mutated in Python via buffers 
created from 'from_buffer' would be very bad.

Also, I can't reproduce the reported behavior with 3.1.3:

Python 3.1.3 (unknown, Nov  9 2011, 19:57:58) 
[GCC 4.6.1 20110908 (Red Hat 4.6.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> (ctypes.c_char*5).from_buffer(b'abcde')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected an object with a writable buffer interface

Are you sure it was 3.1.3?  At first I thought you might be using
3.0a, since bytes are mutable in that version, but 'from_buffer'
didn't exist in those times.
History
Date User Action Args
2011-11-10 03:10:49meador.ingesetrecipients: + meador.inge, theller, vstinner, santoso.wijaya, benrg
2011-11-10 03:10:49meador.ingesetmessageid: <1320894649.83.0.85326768542.issue11427@psf.upfronthosting.co.za>
2011-11-10 03:10:49meador.ingelinkissue11427 messages
2011-11-10 03:10:48meador.ingecreate