Skip to content

Commit b644446

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents 9dba679 + 8d08dc6 commit b644446

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ This project was created by `Wenzel
139139
Jakob <http://rgl.epfl.ch/people/wjakob>`_. Significant features and/or
140140
improvements to the code were contributed by Jonas Adler, Lori A. Burns,
141141
Sylvain Corlay, Eric Cousineau, Aaron Gokaslan, Ralf Grosse-Kunstleve, Trent Houliston, Axel
142-
Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov Johan Mabille, Tomasz Miąsko,
142+
Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov, Johan Mabille, Tomasz Miąsko,
143143
Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim
144144
Schellart, Henry Schreiner, Ivan Smirnov, Boris Staletic, and Patrick Stewart.
145145

docs/changelog.rst

+15
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ IN DEVELOPMENT
1616
Changes will be summarized here periodically.
1717

1818

19+
Version 2.11.1 (July 17, 2023)
20+
-----------------------------
21+
22+
Changes:
23+
24+
* ``PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF`` is now provided as an option
25+
for disabling the default-on ``PyGILState_Check()``'s in
26+
``pybind11::handle``'s ``inc_ref()`` & ``dec_ref()``.
27+
`#4753 <https://github.com/pybind/pybind11/pull/4753>`_
28+
29+
* ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF`` was disabled for PyPy in general
30+
(not just PyPy Windows).
31+
`#4751 <https://github.com/pybind/pybind11/pull/4751>`_
32+
33+
1934
Version 2.11.0 (July 14, 2023)
2035
-----------------------------
2136

include/pybind11/detail/common.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,8 @@ PYBIND11_WARNING_POP
324324
#endif
325325

326326
// See description of PR #4246:
327-
#if !defined(NDEBUG) && !defined(PY_ASSERT_GIL_HELD_INCREF_DECREF) \
328-
&& !(defined(PYPY_VERSION) \
329-
&& defined(_MSC_VER)) /* PyPy Windows: pytest hangs indefinitely at the end of the \
330-
process (see PR #4268) */ \
331-
&& !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)
327+
#if !defined(PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF) && !defined(NDEBUG) \
328+
&& !defined(PYPY_VERSION) && !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)
332329
# define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
333330
#endif
334331

include/pybind11/pytypes.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,12 @@ class handle : public detail::object_api<handle> {
303303
stderr,
304304
"%s is being called while the GIL is either not held or invalid. Please see "
305305
"https://pybind11.readthedocs.io/en/stable/advanced/"
306-
"misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\n",
306+
"misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\n"
307+
"If you are convinced there is no bug in your code, you can #define "
308+
"PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF"
309+
"to disable this check. In that case you have to ensure this #define is consistently "
310+
"used for all translation units linked into a given pybind11 extension, otherwise "
311+
"there will be ODR violations.",
307312
function_name.c_str());
308313
fflush(stderr);
309314
if (Py_TYPE(m_ptr)->tp_name != nullptr) {

0 commit comments

Comments
 (0)