pygobject/pycairo

PEP 630 – Isolating Extension Modules

lazka opened this issue · 2 comments

lazka commented

This is trickier than I thought, lots of API was only added in 3.9/3.10/11.

The PEP can't be used alone, it also requires support for sub-interpreters: https://peps.python.org/pep-0489/#subinterpreters-and-interpreter-reloading

  • all cairo_user_data_key_t needs to move to the module state, and all accesses to it
  • PyImport_ImportModule needs to go and use module state
  • types need to be heap types from what I see for most state functions to work: https://peps.python.org/pep-0630/#heap-types

So this isn't possible right now

lazka commented

More info: https://peps.python.org/pep-0630/

We can only start looking at this with 3.9+