File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,6 @@ following checklist.
155155 within pybind11 that will throw exceptions on certain GIL handling errors
156156 (reference counting operations).
157157
158- .. _misc_free_threading :
159-
160158Free-threading support
161159==================================================================
162160
@@ -180,8 +178,6 @@ your code is thread safe. Modules must still be built against the Python free-t
180178enable free-threading, even if they specify this tag. Adding this tag does not break
181179compatibility with non-free-threaded Python.
182180
183- .. _misc_subinterp :
184-
185181Sub-interpreter support
186182==================================================================
187183
Original file line number Diff line number Diff line change @@ -342,7 +342,13 @@ TEST_CASE("Per-Subinterpreter GIL") {
342342 T_REQUIRE (caught);
343343
344344 // widget_module did provide the per_interpreter_gil tag, so it this does not throw
345- py::module_::import (" widget_module" );
345+ try {
346+ py::module_::import (" widget_module" );
347+ caught = false ;
348+ } catch (pybind11::error_already_set &) {
349+ caught = true ;
350+ }
351+ T_REQUIRE (!caught);
346352
347353 // widget_module did provide the per_interpreter_gil tag, so it this does not throw
348354 py::module_::import (" widget_module" );
You can’t perform that action at this time.
0 commit comments