Skip to content

Add per-interpreter storage for gil_safe_call_once_and_store #10418

Add per-interpreter storage for gil_safe_call_once_and_store

Add per-interpreter storage for gil_safe_call_once_and_store #10418

Triggered via pull request December 23, 2025 09:49
Status Cancelled
Total duration 34m 39s
Artifacts

ci.yml

on: pull_request
Manylinux on 🐍 3.13t • GIL
6m 13s
Manylinux on 🐍 3.13t • GIL
🐍 3.10 • CUDA 12.2 • Ubuntu 22.04
9m 48s
🐍 3.10 • CUDA 12.2 • Ubuntu 22.04
🐍 3 • NVHPC 25.11 • C++17 • x64
21m 8s
🐍 3 • NVHPC 25.11 • C++17 • x64
🐍 3 • ICC latest • x64
19m 9s
🐍 3 • ICC latest • x64
🐍 3.9 • Debian • x86 • Install
4m 43s
🐍 3.9 • Debian • x86 • Install
Documentation build test
50s
Documentation build test
Matrix: centos
Matrix: clang
Matrix: deadsnakes
Matrix: gcc
Matrix: inplace
Matrix: mingw
Matrix: 🐍
Matrix: 🐍
Matrix: win32-debug
Matrix: win32
Matrix: windows-2022
Matrix: windows_arm_clang_msvc
Matrix: windows_arm_clang_msys2
Matrix: windows_clang
Fit to window
Zoom out
Zoom in

Annotations

19 errors and 2 warnings
🐍 3.12 • macos-latest • x64 inplace C++14
Process completed with exit code 1.
🐍 (windows-latest, 3.14, -DCMAKE_CXX_STANDARD=20) / 🧪
Process completed with exit code 1.
🐍 (windows-latest, 3.14t, -DCMAKE_CXX_STANDARD=23) / 🧪
Process completed with exit code 1.
🐍 (ubuntu-latest, 3.14, -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_HAS_SUBINTERPRET... / 🧪: tests/test_multiple_interpreters/test_multiple_interpreters.py#L419
test_import_in_subinterpreter_concurrently Failed: Subprocess failed with exit code 1. Code: ```python import gc import sys from concurrent.futures import InterpreterPoolExecutor, as_completed sys.path.append('.') def test(): import collections import mod_per_interpreter_gil_with_singleton as m objects = m.get_objects_in_singleton() assert objects == [ type(None), tuple, list, dict, collections.OrderedDict, collections.defaultdict, collections.deque, ] assert hasattr(m, 'MyClass') assert hasattr(m, 'MyGlobalError') assert hasattr(m, 'MyLocalError') assert hasattr(m, 'MyEnum') futures = future = None with InterpreterPoolExecutor(max_workers=16) as executor: futures = [executor.submit(test) for _ in range(32)] for future in as_completed(futures): future.result() del futures, future, executor for _ in range(5): gc.collect() ``` Output: Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/interpreter.py", line 84, in run return self.interp.call(do_call, self.results, *task) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/interpreters/__init__.py", line 238, in call return self._call(callable, args, kwargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/interpreters/__init__.py", line 222, in _call raise ExecutionFailed(excinfo) concurrent.interpreters.ExecutionFailed: ImportError: generic_type: type "MyClass" is already registered! Uncaught in the interpreter: Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/interpreter.py", line 11, in do_call return func(*args, **kwargs) File "<string>", line 9, in test ImportError: generic_type: type "MyClass" is already registered! The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<string>", line 31, in <module> future.result() ~~~~~~~~~~~~~^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/_base.py", line 443, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result raise self._exception File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/futures/interpreter.py", line 91, in run raise exc from wrapper ImportError: generic_type: type "MyClass" is already registered!
🐍 (ubuntu-latest, 3.14, -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_HAS_SUBINTERPRET... / 🧪: tests/test_multiple_interpreters/test_multiple_interpreters.py#L339
test_import_in_subinterpreter_before_main Failed: Subprocess failed with exit code 1. Code: ```python import sys sys.path.append('.') def test(): import collections import mod_per_interpreter_gil_with_singleton as m objects = m.get_objects_in_singleton() assert objects == [ type(None), tuple, list, dict, collections.OrderedDict, collections.defaultdict, collections.deque, ] assert hasattr(m, 'MyClass') assert hasattr(m, 'MyGlobalError') assert hasattr(m, 'MyLocalError') assert hasattr(m, 'MyEnum') import contextlib import gc from concurrent import interpreters interp = None with contextlib.closing(interpreters.create()) as interp: interp.call(test) test() del interp for _ in range(5): gc.collect() ``` Output: Traceback (most recent call last): File "<string>", line 33, in <module> test() ~~~~^^ File "<string>", line 10, in test assert objects == [ ^^^^^^^^^^^^ ...<7 lines>... ] ^ AssertionError
🐍 (ubuntu-latest, 3.14, -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_HAS_SUBINTERPRET... / 🧪: tests/test_multiple_interpreters/test_multiple_interpreters.py#L283
test_import_in_subinterpreter_after_main Failed: Subprocess failed with exit code 1. Code: ```python import sys sys.path.append('.') def test(): import collections import mod_per_interpreter_gil_with_singleton as m objects = m.get_objects_in_singleton() assert objects == [ type(None), tuple, list, dict, collections.OrderedDict, collections.defaultdict, collections.deque, ] assert hasattr(m, 'MyClass') assert hasattr(m, 'MyGlobalError') assert hasattr(m, 'MyLocalError') assert hasattr(m, 'MyEnum') import contextlib import gc from concurrent import interpreters test() interp = None with contextlib.closing(interpreters.create()) as interp: interp.call(test) del interp for _ in range(5): gc.collect() ``` Output: Traceback (most recent call last): File "<string>", line 33, in <module> interp.call(test) ~~~~~~~~~~~^^^^^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/interpreters/__init__.py", line 238, in call return self._call(callable, args, kwargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/concurrent/interpreters/__init__.py", line 222, in _call raise ExecutionFailed(excinfo) concurrent.interpreters.ExecutionFailed: ImportError: generic_type: type "MyClass" is already registered! Uncaught in the interpreter: Traceback (most recent call last): File "<string>", line 7, in test ImportError: generic_type: type "MyClass" is already registered!
🐍 (ubuntu-latest, 3.14, -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_HAS_SUBINTERPRET... / 🧪: tests/test_multiple_interpreters/test_multiple_interpreters.py#L251
test_import_module_with_singleton_per_interpreter concurrent.interpreters.ExecutionFailed: ImportError: pybind11::native_enum<...>("MyEnum") is already registered as a `pybind11::enum_` or `pybind11::class_`! Uncaught in the interpreter: Traceback (most recent call last): File "<script>", line 25, in <module> File "<script>", line 7, in test ImportError: pybind11::native_enum<...>("MyEnum") is already registered as a `pybind11::enum_` or `pybind11::class_`!
🐍 (windows-2022, 3.8, -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DPYBIND11_NUMPY_1_ONLY=ON) / 🧪
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
🐍 (windows-latest, 3.13t, -DCMAKE_CXX_STANDARD=17) / 🧪
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
🐍 (windows-latest, 3.13t, -DCMAKE_CXX_STANDARD=17) / 🧪
The operation was canceled.
🐍 3 • windows-latest • mingw32
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
🐍 3 • windows-latest • mingw32
The operation was canceled.
🐍 3 • windows-latest • mingw64
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
🐍 3 • windows-latest • mingw64
The operation was canceled.
CI
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
CI
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
CI
Canceling since a higher priority waiting request for test-refs/pull/5933/merge exists
🐍 (ubuntu-latest, graalpy-24.1) / 🧪: /opt/hostedtoolcache/GraalPy/24.1.2/x64/lib/python3.11/site-packages/setuptools/__init__.py#L10
The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives