fix: allow subinterp support to be disabled

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2025-05-30 21:11:27 -04:00
committed by Henry Schreiner
parent 33fb53335e
commit e4873e8f59
8 changed files with 23 additions and 11 deletions

View File

@@ -23,9 +23,12 @@ def test_independent_subinterpreters():
elif sys.version_info >= (3, 12):
import _xxsubinterpreters as interpreters
else:
pytest.skip("Test requires a the interpreters stdlib module")
pytest.skip("Test requires the interpreters stdlib module")
import mod_per_interpreter_gil as m
m = pytest.importorskip("mod_per_interpreter_gil")
if not m.PYBIND11_HAS_SUBINTERPRETER_SUPPORT:
pytest.skip("Does not have subinterpreter support compiled in")
code = """
import mod_per_interpreter_gil as m
@@ -94,9 +97,12 @@ def test_dependent_subinterpreters():
elif sys.version_info >= (3, 12):
import _xxsubinterpreters as interpreters
else:
pytest.skip("Test requires a the interpreters stdlib module")
pytest.skip("Test requires the interpreters stdlib module")
import mod_shared_interpreter_gil as m
m = pytest.importorskip("mod_shared_interpreter_gil")
if not m.PYBIND11_HAS_SUBINTERPRETER_SUPPORT:
pytest.skip("Does not have subinterpreter support compiled in")
code = """
import mod_shared_interpreter_gil as m