From 5db624d4d05e1a884eb7a36d1fff86b2a24977ad Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 27 May 2025 01:06:04 -0400 Subject: [PATCH 1/2] chore: prepare for 3.0.0rc2 Signed-off-by: Henry Schreiner --- docs/changelog.md | 38 +++++++++++++++++++++++++++----- include/pybind11/detail/common.h | 4 ++-- tools/make_changelog.py | 6 ++--- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index f4fb8bb8d1..d3758e129c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -44,7 +44,8 @@ New Features: - Changed `PYBIND11_MODULE` macro implementation to perform multi-phase module initialization (PEP 489) behind the scenes. - [#5574](https://github.com/pybind/pybind11/pull/5574) + [#5574](https://github.com/pybind/pybind11/pull/5574) and avoid destruction + [#5688](https://github.com/pybind/pybind11/pull/5688) - Support for sub-interpreters (both isolated (with separate GILs) and legacy (with a global GIL). Add the @@ -54,15 +55,18 @@ New Features: indicate that a module supports running with sub-interpreters. [#5564](https://github.com/pybind/pybind11/pull/5564) + - Rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention. + [#5682](https://github.com/pybind/pybind11/pull/5682) + - Changed `PYBIND11_EMBEDDED_MODULE` macro implementation to perform multi-phase module initialization (PEP 489) behind the scenes and to support `py::mod_gil_not_used()`, `py::multiple_interpreters::per_interpreter_gil()` and `py::multiple_interpreters::shared_gil()`. [#5665](https://github.com/pybind/pybind11/pull/5665) and consolidate code - [#5670](https://github.com/pybind/pybind11/pull/5670) + [#5670](https://github.com/pybind/pybind11/pull/5670). -* Added API in `pybind11/subinterpreter.h` for embedding sub-intepreters (requires Python 3.12+). +- Added API in `pybind11/subinterpreter.h` for embedding sub-intepreters (requires Python 3.12+). [#5666](https://github.com/pybind/pybind11/pull/5666) - `py::native_enum` was added, for conversions between Python's native @@ -114,6 +118,9 @@ New Features: update example for `pybind11::custom_type_setup` in documentation. [#5669](https://github.com/pybind/pybind11/pull/5669) +* Added `py::scoped_critical_section` for free-threaded use. + [#5684](https://github.com/pybind/pybind11/pull/5684) + New Features / fixes (typing): - Added option for different arg/return type hints to `type_caster`. @@ -217,7 +224,7 @@ Bug fixes: equivalent to `::` in Python. [#5620](https://github.com/pybind/pybind11/pull/5620) -Bug fixes (CMake): +Bug fixes and features (CMake): - Enable FindPython mode by default, with a `COMPAT` mode that sets some of the old variables to ease transition. @@ -239,6 +246,9 @@ Bug fixes (CMake): - Restructure venv support to support `--fresh`, make in build folder. [#5668](https://github.com/pybind/pybind11/pull/5668) +* Presets now generate `compile_commands.json`. + [#5685](https://github.com/pybind/pybind11/pull/5685) + Bug fixes (free-threading): - Fix data race in free threaded CPython when accessing a shared static @@ -261,15 +271,21 @@ Internals: that it can easily be reused. [#5614](https://github.com/pybind/pybind11/pull/5614) +* Use CPython macros to construct `PYBIND11_VERSION_HEX`. + [#5683](https://github.com/pybind/pybind11/pull/5683) + Documentation: - Improved `reference_internal` policy documentation. [#5528](https://github.com/pybind/pybind11/pull/5528) + - A new "Double locking, deadlocking, GIL" document was added. [#5394](https://github.com/pybind/pybind11/pull/5394) + - Adds an answer (FAQ) for "What is a highly conclusive and simple way to find memory leaks?". [#5340](https://github.com/pybind/pybind11/pull/5340) + - Add documenting for free-threading and subinterpreters. [#5659](https://github.com/pybind/pybind11/pull/5659) @@ -293,27 +309,39 @@ Tests: * Add nightly wheels to scientific-python's nightly wheelhouse. [#5675](https://github.com/pybind/pybind11/pull/5675) +* Expect free-threaded warning when loading a non-free-threaded module. + [#5680](https://github.com/pybind/pybind11/pull/5680) + New and removed platforms: - Support Python 3.14 (beta 1). [#5646](https://github.com/pybind/pybind11/pull/5646) + - Added support for GraalPy Python implementation (). [#5380](https://github.com/pybind/pybind11/pull/5380) + - Support for PyPy 3.11 added. [#5508](https://github.com/pybind/pybind11/pull/5508) + - Support for PyPy 3.8 and 3.9 was dropped. [#5578](https://github.com/pybind/pybind11/pull/5578) + - Support for Python 3.7 was removed. (Official end-of-life: 2023-06-27). [#5191](https://github.com/pybind/pybind11/pull/5191) + - Support for CMake older than 3.15 removed. CMake 3.15-4.0 supported. - [#5304](https://github.com/pybind/pybind11/pull/5304) + [#5304](https://github.com/pybind/pybind11/pull/5304) and fix regression [#5688](https://github.com/pybind/pybind11/pull/5688). + - Use scikit-build-core for the build backend for the PyPI `pybind11`. The CMake generation has been moved to the sdist-\>wheel step. `PYBIND11_GLOBAL_SDIST` has been removed. [#5598](https://github.com/pybind/pybind11/pull/5598) and updated docs/ci. [#5676](https://github.com/pybind/pybind11/pull/5676) +* clang 20 tested and used for clang-tidy. + [#5692](https://github.com/pybind/pybind11/pull/5692) + ## Version 2.13.6 (September 13, 2024) New Features: diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 4dcda799ac..096d301b31 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -25,9 +25,9 @@ // Use 0xA0 (LEVEL=0xA, SERIAL=0) for development versions. // - For stable releases, set the serial to 0. #define PYBIND11_VERSION_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA -#define PYBIND11_VERSION_RELEASE_SERIAL 1 +#define PYBIND11_VERSION_RELEASE_SERIAL 2 // String version of (micro, release level, release serial), e.g.: 0a0, 0b1, 0rc1, 0 -#define PYBIND11_VERSION_PATCH 0rc1 +#define PYBIND11_VERSION_PATCH 0rc2 /* -- end version constants -- */ #if !defined(Py_PACK_FULL_VERSION) diff --git a/tools/make_changelog.py b/tools/make_changelog.py index 03ceb71631..a2e4c79cda 100755 --- a/tools/make_changelog.py +++ b/tools/make_changelog.py @@ -65,10 +65,10 @@ continue msg = changelog.group("content").strip() - if msg.startswith("- "): + if msg.startswith("* "): msg = msg[2:] - if not msg.startswith("* "): - msg = "* " + msg + if not msg.startswith("- "): + msg = "- " + msg if not msg.endswith("."): msg += "." From f6b7997ef5576a2146aa82c1eab09baa30478568 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 28 May 2025 23:35:23 -0400 Subject: [PATCH 2/2] Update docs/changelog.md --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index d3758e129c..55cb851668 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -118,7 +118,7 @@ New Features: update example for `pybind11::custom_type_setup` in documentation. [#5669](https://github.com/pybind/pybind11/pull/5669) -* Added `py::scoped_critical_section` for free-threaded use. +* Added `py::scoped_critical_section` to support free-threaded mode. [#5684](https://github.com/pybind/pybind11/pull/5684) New Features / fixes (typing):