feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)

* Move embedded modules to multiphase init

So that they too can support multi-interpreter and nogil tags

* Update the multiple interpreter test for embedded module changes

* Add a note to embedded module docs about the new tags

* Oops, missed a warning pop

* Remove unused variable

* Update ci.yml

* Fix this embedded GIL test for free-threading

* Oops, need to use ptr() here

* This test created a subinterpreter when PYBIND11_SUBINTERPRETER_SUPPORT was off

So the fix is really this test should not be run in these older versions at all.

The hang was a GIL issue between the subinterpreters during pybind11::exception::what().

* fix: standard mutex for 3.13t

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
b-pass
2025-05-18 09:39:26 -04:00
committed by GitHub
parent 094343c74a
commit 9afc9c4ffb
6 changed files with 70 additions and 21 deletions

View File

@@ -34,7 +34,9 @@ jobs:
python:
- '3.8'
- '3.13'
- '3.13t'
- '3.14'
- '3.14t'
- 'pypy-3.10'
- 'pypy-3.11'
- 'graalpy-24.2'