Bug 45229 - py2cairo, ImageSurface.create_for_data uses deprecated buffer API.
Summary: py2cairo, ImageSurface.create_for_data uses deprecated buffer API.
Status: RESOLVED FIXED
Alias: None
Product: pycairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Steve Chaplin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 06:16 UTC by dkreuter
Modified: 2012-04-22 02:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.