Skip to content
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
729654c
Add new argument to `gil_safe_call_once_and_store::call_once_and_stor…
XuehaiPan Dec 13, 2025
d2b7605
Add per-interpreter storage for `gil_safe_call_once_and_store`
XuehaiPan Dec 13, 2025
e741760
Make `~gil_safe_call_once_and_store` a no-op
XuehaiPan Dec 14, 2025
5d1d678
Fix C++11 compatibility
XuehaiPan Dec 14, 2025
0bac82d
Improve thread-safety and add default finalizer
XuehaiPan Dec 14, 2025
2a4b118
Merge branch 'master' into subinterp-call-once-and-store
XuehaiPan Dec 14, 2025
be97110
Try fix thread-safety
XuehaiPan Dec 14, 2025
3e77ce9
Try fix thread-safety
XuehaiPan Dec 14, 2025
d5b8813
Add a warning comment
XuehaiPan Dec 15, 2025
f6d0f88
Simplify `PYBIND11_INTERNALS_VERSION >= 12`
XuehaiPan Dec 15, 2025
7d8339e
Try fix thread-safety
XuehaiPan Dec 15, 2025
1920f43
Try fix thread-safety
XuehaiPan Dec 15, 2025
900bed6
Merge branch 'master' into subinterp-call-once-and-store
XuehaiPan Dec 15, 2025
a6754ba
Revert get_pp()
XuehaiPan Dec 16, 2025
1aed3ab
Update comments
XuehaiPan Dec 16, 2025
b61e902
Move call-once storage out of internals
XuehaiPan Dec 17, 2025
b72cd41
Revert internal version bump
XuehaiPan Dec 17, 2025
ac02a32
Cleanup outdated comments
XuehaiPan Dec 17, 2025
ddb6dd4
Move atomic_bool alias into pybind11::detail namespace
rwgk Dec 20, 2025
3fb52df
Add explicit #include <unordered_map> for subinterpreter support
rwgk Dec 20, 2025
32deca4
Remove extraneous semicolon after destructor definition
rwgk Dec 20, 2025
a4d4d73
Add comment explaining unused finalize parameter
rwgk Dec 20, 2025
7cb30ce
Add comment explaining error_scope usage
rwgk Dec 20, 2025
7d34139
Improve exception safety in get_or_create_call_once_storage_map()
rwgk Dec 20, 2025
78e3945
Add timeout-minutes: 3 to cpptest workflow steps
rwgk Dec 20, 2025
1014ee4
Add progress reporter for test_with_catch Catch2 runner
rwgk Dec 20, 2025
21d0dc5
clang-format auto-fix (overlooked before)
rwgk Dec 20, 2025
e1b1b1b
Disable "Move Subinterpreter" test on free-threaded Python 3.14+
rwgk Dec 21, 2025
89cae6d
style: pre-commit fixes
pre-commit-ci[bot] Dec 21, 2025
a090637
Add test for gil_safe_call_once_and_store per-interpreter isolation
rwgk Dec 21, 2025
cb5e7d7
Add STARTING/DONE timestamps to test_with_catch output
rwgk Dec 21, 2025
0f8f32a
Disable stdout buffering in test_with_catch
rwgk Dec 21, 2025
a3abdee
EXPERIMENT: Re-enable hanging test to verify CI log buffering fix
rwgk Dec 21, 2025
d6f2a7f
Revert "Disable stdout buffering in test_with_catch"
rwgk Dec 21, 2025
9b70460
Use USES_TERMINAL for cpptest to show output immediately
rwgk Dec 21, 2025
8951004
Fix clang-tidy performance-avoid-endl warning
rwgk Dec 21, 2025
c4cbe73
Add SIGTERM handler to show when test is killed by timeout
rwgk Dec 21, 2025
f330a79
Fix typo: atleast -> at_least
rwgk Dec 21, 2025
6c1ccb9
Fix GCC warn_unused_result error for write() in signal handler
rwgk Dec 21, 2025
3c01ff3
Add USES_TERMINAL to other C++ test targets
rwgk Dec 21, 2025
9e9843d
Revert "EXPERIMENT: Re-enable hanging test to verify CI log buffering…
rwgk Dec 21, 2025
e7c2648
Update comment to reference PR #5940 for Move Subinterpreter fix
rwgk Dec 21, 2025
58c08ac
Add alias `interpid_t = std::int64_t`
XuehaiPan Dec 21, 2025
305a293
Add isolation and gc test for `gil_safe_call_once_and_store`
XuehaiPan Dec 21, 2025
f6bba0f
Add thread local cache for gil_safe_call_once_and_store
XuehaiPan Dec 21, 2025
66e4697
Revert "Add thread local cache for gil_safe_call_once_and_store"
XuehaiPan Dec 21, 2025
d0819cc
Revert changes according to code review
XuehaiPan Dec 21, 2025
5ce00e5
Relocate multiple-interpreters tests
XuehaiPan Dec 21, 2025
97b50fe
Add more tests for multiple interpreters
XuehaiPan Dec 21, 2025
8819ec4
Remove copy constructor
XuehaiPan Dec 21, 2025
e84e9c1
Merge remote-tracking branch 'upstream/master' into subinterp-call-on…
XuehaiPan Dec 22, 2025
d9daef5
Apply suggestions from code review
XuehaiPan Dec 22, 2025
9a3328b
Refactor to use per-storage capsule instead
XuehaiPan Dec 22, 2025
b68faf0
Merge remote-tracking branch 'upstream/master' into subinterp-call-on…
XuehaiPan Dec 22, 2025
bc20601
Update comments
XuehaiPan Dec 22, 2025
b39c049
Update singleton tests
XuehaiPan Dec 22, 2025
9ef71ec
Use interpreter id type for `get_num_interpreters_seen()`
XuehaiPan Dec 22, 2025
98370f2
Suppress unused variable warning
XuehaiPan Dec 22, 2025
534235e
HACKING
XuehaiPan Dec 22, 2025
d038714
Revert "HACKING"
XuehaiPan Dec 22, 2025
3a2c34a
Try fix concurrency
XuehaiPan Dec 22, 2025
99a095d
Test even harder
XuehaiPan Dec 22, 2025
7daecd7
Reorg code to avoid duplicates
XuehaiPan Dec 23, 2025
cd950dc
Fix unique_ptr::reset -> unique_ptr::release
XuehaiPan Dec 23, 2025
db22bb4
Merge remote-tracking branch 'upstream/master' into subinterp-call-on…
XuehaiPan Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ jobs:
run: cmake --build . --target pytest

- name: Compiled tests
timeout-minutes: 3
run: cmake --build . --target cpptest

- name: Interface test
Expand Down Expand Up @@ -334,6 +335,7 @@ jobs:
run: cmake --build --preset default --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build --preset default --target cpptest

- name: Visibility test
Expand Down Expand Up @@ -393,6 +395,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build build --target cpptest

- name: Interface test
Expand Down Expand Up @@ -516,6 +519,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build build --target cpptest

- name: Interface test
Expand Down Expand Up @@ -570,6 +574,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build build --target cpptest

- name: Interface test
Expand Down Expand Up @@ -652,6 +657,7 @@ jobs:
cmake --build build-11 --target check
- name: C++ tests C++11
timeout-minutes: 3
run: |
set +e; source /opt/intel/oneapi/setvars.sh; set -e
cmake --build build-11 --target cpptest
Expand Down Expand Up @@ -689,6 +695,7 @@ jobs:
cmake --build build-17 --target check
- name: C++ tests C++17
timeout-minutes: 3
run: |
set +e; source /opt/intel/oneapi/setvars.sh; set -e
cmake --build build-17 --target cpptest
Expand Down Expand Up @@ -760,6 +767,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build build --target cpptest

- name: Interface test
Expand Down Expand Up @@ -1000,6 +1008,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++20 tests
timeout-minutes: 3
run: cmake --build build --target cpptest -j 2

- name: Interface test C++20
Expand Down Expand Up @@ -1076,6 +1085,7 @@ jobs:
run: cmake --build build --target pytest -j 2

- name: C++11 tests
timeout-minutes: 3
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2

- name: Interface test C++11
Expand All @@ -1100,6 +1110,7 @@ jobs:
run: cmake --build build2 --target pytest -j 2

- name: C++14 tests
timeout-minutes: 3
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2

- name: Interface test C++14
Expand All @@ -1124,6 +1135,7 @@ jobs:
run: cmake --build build3 --target pytest -j 2

- name: C++17 tests
timeout-minutes: 3
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2

- name: Interface test C++17
Expand Down Expand Up @@ -1195,6 +1207,7 @@ jobs:
run: cmake --build . --target pytest -j 2

- name: C++ tests
timeout-minutes: 3
run: cmake --build . --target cpptest -j 2

- name: Interface test
Expand Down Expand Up @@ -1257,6 +1270,7 @@ jobs:
run: cmake --build . --target pytest -j 2

- name: C++ tests
timeout-minutes: 3
run: cmake --build . --target cpptest -j 2

- name: Interface test
Expand Down Expand Up @@ -1329,6 +1343,7 @@ jobs:
run: cmake --build build --target pytest -j 2

- name: C++ tests
timeout-minutes: 3
run: PYTHONHOME=/clangarm64 PYTHONPATH=/clangarm64 cmake --build build --target cpptest -j 2

- name: Interface test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
run: cmake --build build --target pytest

- name: C++ tests
timeout-minutes: 3
run: cmake --build build --target cpptest

- name: Interface test
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
run: cmake --build build11 --target pytest -j 2

- name: C++11 tests
timeout-minutes: 3
run: cmake --build build11 --target cpptest -j 2

- name: Interface test C++11
Expand All @@ -87,6 +88,7 @@ jobs:
run: cmake --build build17 --target pytest

- name: C++17 tests
timeout-minutes: 3
run: cmake --build build17 --target cpptest

# Third build - C++17 mode with unstable ABI
Expand Down
2 changes: 2 additions & 0 deletions include/pybind11/detail/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ class internals_pp_manager {

char const *holder_id_ = nullptr;
on_fetch_function *on_fetch_ = nullptr;
// Pointer-to-pointer to the singleton internals for the first seen interpreter (may not be the
// main interpreter)
std::unique_ptr<InternalsType> *internals_singleton_pp_;
};

Expand Down
Loading
Loading