Skip to content

Commit c9ebde2

Browse files
committed
Sync some things that were split out into pybind#5665
1 parent 10a7356 commit c9ebde2

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/advanced/misc.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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-
160158
Free-threading support
161159
==================================================================
162160

@@ -180,8 +178,6 @@ your code is thread safe. Modules must still be built against the Python free-t
180178
enable free-threading, even if they specify this tag. Adding this tag does not break
181179
compatibility with non-free-threaded Python.
182180

183-
.. _misc_subinterp:
184-
185181
Sub-interpreter support
186182
==================================================================
187183

tests/test_embed/test_subinterpreter.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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");

0 commit comments

Comments
 (0)