Skip to content

Commit 2965fa8

Browse files
rwgkbzaarEthanSteinbergpre-commit-ci[bot]
authored
Preparation for v2.11.1 patch release (#4752)
* Update README.rst - Add missing comma in the list of acknowlegements (#4750) * Disable `PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF` generally for PyPy (not just PyPy Windows). (#4751) * Update changelog * Provide `PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF` as an option (#4753) * Remove GIL checks * Update common.h * Add flag * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Update changelog: PR #4753 --------- Co-authored-by: bzaar <[email protected]> Co-authored-by: Ethan Steinberg <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1a917f1 commit 2965fa8

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

README.rst

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

docs/changelog.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ Changes will be added here periodically from the "Suggested changelog entry"
1010
block in pull request descriptions.
1111

1212

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

include/pybind11/detail/common.h

Lines changed: 2 additions & 5 deletions
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

Lines changed: 6 additions & 1 deletion
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)