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.

classification
Title: c_char doesn't implement py3k buffer interface
Type: behavior Stage:
Components: ctypes Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: theller Nosy List: benjamin.peterson, christian.heimes, pitrou, theller
Priority: critical Keywords:

Created on 2008-05-04 22:35 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg66252 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-05-04 22:35
I'm currently merging changes from trunk to 3.0. One unit test is failing:

test test_ctypes failed -- Traceback (most recent call last):
  File "Lib/ctypes/test/test_frombuffer.py", line 67, in
test_from_buffer_copy
    x = (c_char * 16).from_buffer_copy("a" * 16)
TypeError: expected an object with a buffer interface
msg66258 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-05-05 06:44
Thanks for your efforts, Christian.
This test needs an object which implements the readonly buffer interface.

Unfortunately the bytes object that I would like to use is broken:
http://bugs.python.org/issue2538
msg71646 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-21 14:53
Ping
msg71649 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-21 15:14
Thomas, the bytes object is not broken anymore with respect to the
buffer API, but it depends which buffer API you are talking about :-) I
hope it is the new, 3.0 one.
msg71725 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-08-22 06:23
The test has already been fixed and reenabled in rev 65849.
History
Date User Action Args
2022-04-11 14:56:34adminsetgithub: 47013
2008-08-22 06:23:27thellersetstatus: open -> closed
resolution: fixed
messages: + msg71725
2008-08-21 15:14:28pitrousetnosy: + pitrou
messages: + msg71649
2008-08-21 14:53:34benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg71646
2008-05-05 06:44:22thellersetmessages: + msg66258
2008-05-04 22:35:04christian.heimescreate