Repository navigation
Allow C extensions to declare compatibility with free-threading #116322
Copy link
Copy link
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancementinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Mar 4, 2024 What warning category should this issue?
ImportWarningsounds like a good fit at first, but it's ignored by the default warning filters, which we don't want. Of the categories not ignored by default,RuntimeWarningseems like the best fit to me.- changed the title
[-]Implement `Py_mod_gil` slot for free-threading-safe extensions[/-][+]Allow C extensions to declare compatibility with free-threading[/+]on May 2, 2024 - added a commit that references this issue
on May 3, 2024 @swtaarrs is this finished now?
Yep!
- added a commit that references this issue
on Jul 25, 2024 - added a commit that references this issue
on Jul 25, 2024 - added a commit that references this issue
on Jul 25, 2024 - added a commit that references this issue
on Oct 14, 2024 danielivascsenko2-ux commented
on Aug 22, 2025 on Aug 22, 2025 · Hidden as spamshow commentMore actions
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
There are a few pieces to this:
Py_mod_gilslot, as described in PEP 703, that multi-phase init modules can use to indicate that they support free-threading.PyModule_ExperimentalSetGIL()function (discussed here) that single-phase init modules can use in place ofPy_mod_gil.1-3 are addressed in gh-116882; 4 will be addressed in a separate PR.
Linked PRs