File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,12 +212,6 @@ naturally:
212212 assert(locals["message"].cast<std::string>() == "1 + 2 = 3");
213213 }
214214
215- ``PYBIND11_EMBEDDED_MODULE `` also accepts
216- :func: `py::mod_gil_not_used() `,
217- :func: `py::multiple_interpreters::per_interpreter_gil() `, and
218- :func: `py::multiple_interpreters::shared_gil() ` tags just like ``PYBIND11_MODULE ``.
219- See :ref: `misc_subinterp ` and :ref: `misc_free_threading ` for more information.
220-
221215
222216 Interpreter lifetime
223217====================
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 @@ -339,7 +339,13 @@ TEST_CASE("Per-Subinterpreter GIL") {
339339 T_REQUIRE (caught);
340340
341341 // widget_module did provide the per_interpreter_gil tag, so it this does not throw
342- py::module_::import (" widget_module" );
342+ try {
343+ py::module_::import (" widget_module" );
344+ caught = false ;
345+ } catch (pybind11::error_already_set &) {
346+ caught = true ;
347+ }
348+ T_REQUIRE (!caught);
343349
344350 T_REQUIRE (!py::hasattr (py::module_::import (" external_module" ), " multi_interp" ));
345351 py::module_::import (" external_module" ).attr (" multi_interp" ) = std::to_string (num);
You can’t perform that action at this time.
0 commit comments