Created attachment 129734 [details] [review] Patch from https://lists.cairographics.org/archives/cairo/2011-December/022563.html by Jeremy Moles cubicool at gmail.com I couldn't find a bug report so I create one. It seems that python3-cairo is missing Surface.create_for_data. There are many reports on the Web and the accepted fix seems to install python3-cairocffi. See, for example, https://bugs.launchpad.net/ubuntu/+source/py3cairo/+bug/1330228 or https://github.com/matplotlib/matplotlib/issues/2976 There is even a patch here: https://lists.cairographics.org/archives/cairo/2011-December/022563.html
My use case is to overwrite a do_draw method of a Gtk widget. python-gi exposes a cairo context but I cannot use cr.mask with a cairocffi.SurfacePattern. So I seem to need python3-cairo.
AFAIK, the functions are implemented in the Git repository. I guess the code will go into 'python-cairo' version 1.10.1. I need these functions to draw to a 'mmap' object with Cairo. 'cairocffi' can do this, but it does not go along with Pango.
Ah, true. It seems that https://cgit.freedesktop.org/pycairo/log/ carries https://cgit.freedesktop.org/pycairo/commit/?id=2f9e604ac7bb5f6386179a3d0fad6f095c386f66 The commit message mentions https://bugs.freedesktop.org/show_bug.cgi?id=44935 so I guess this is a duplicate. Are we "only" waiting for a release to happen then? Do we know what's blocking it?
I concluded from the bug discussion you found that the implementation is okay. The most plausible blocking reason is lack of manpower. I wrote to the mailing list https://lists.cairographics.org/mailman/listinfo/cairo asking for a release. Let's see. In the meantime, I will use the Git version.
Fixed since 1.11: https://pycairo.readthedocs.io/en/latest/changelog.html#v1-11-0
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.