Bug 45229

Summary: py2cairo, ImageSurface.create_for_data uses deprecated buffer API.
Product: pycairo Reporter: dkreuter
Component: generalAssignee: Steve Chaplin <d74n5pohf9>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description dkreuter 2012-01-25 06:16:02 UTC
image_surface_create_for_data uses 'array's and PyObject_AsWriteBuffer which are considered outdated in: http://docs.python.org/c-api/objbuffer.html

The new buffer api is available from 2.6 onwards. Switching to it may even fix #44935.
Comment 1 Steve Chaplin 2012-04-22 02:57:36 UTC
The buffer API is deprecated, but so is Python 2 - they are well suited. I don't think it will ever be removed from Python 2, so it should continue to work as it is.
I'm in the process of adding the new buffer API for the Python 3 cairo version. But I don't think its worth adding it for Python 2 cairo since it is probably an incompatible change, and may break existing Python 2 code.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.