Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 630 – Isolating Extension Modules #260

Open
lazka opened this issue Mar 12, 2022 · 2 comments
Open

PEP 630 – Isolating Extension Modules #260

lazka opened this issue Mar 12, 2022 · 2 comments
Milestone

Comments

@lazka
Copy link
Member

lazka commented Mar 12, 2022

https://peps.python.org/pep-0489/

@lazka lazka added this to the 1.22 milestone Mar 12, 2022
@lazka
Copy link
Member Author

lazka commented Mar 13, 2022

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 lazka modified the milestones: 1.22, future Mar 13, 2022
@lazka
Copy link
Member Author

lazka commented Mar 13, 2022

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

We can only start looking at this with 3.9+

@lazka lazka changed the title Port to PEP 489 – Multi-phase extension module initialization PEP 630 – Isolating Extension Modules Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant