From 1a917f1852eb7819b671fc3fa862840f4c491a07 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 14 Jul 2023 08:20:38 -0700 Subject: [PATCH 1/2] docs: preparation for v2.11.0 release (#4744) * Remove .dev1 from version number. * Update Changelog (starting from `nox -s make_changelog` output) * Miscellaneous minor fixes from proofreading in GitHub web view. * docs: minor changelog updates Signed-off-by: Henry Schreiner --------- Signed-off-by: Henry Schreiner Co-authored-by: Henry Schreiner --- docs/changelog.rst | 47 +++++++++++++++++++++++++++----- docs/release.rst | 10 ++++--- include/pybind11/detail/common.h | 4 +-- pybind11/_version.py | 2 +- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 32f6606aa..7bb115b90 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,15 +10,15 @@ Changes will be added here periodically from the "Suggested changelog entry" block in pull request descriptions. -Version 2.11.0 (June 2, 2023) +Version 2.11.0 (July 14, 2023) ----------------------------- New features: -* ``pybind11::detail::is_move_constructible`` can now be specialized for cases - in which ``std::is_move_constructible`` does not work as needed. This is - very similar to the long-established - ``pybind11::detail::is_copy_constructible``. +* The newly added ``pybind11::detail::is_move_constructible`` trait can be + specialized for cases in which ``std::is_move_constructible`` does not work + as needed. This is very similar to the long-established + ``pybind11::detail::is_copy_constructible``. `#4631 `_ * Introduce ``recursive_container_traits``. @@ -30,6 +30,19 @@ New features: with ``pybind/pybind11.h``). `#4601 `_ +* ``format_descriptor<>`` & ``npy_format_descriptor<>`` ``PyObject *`` + specializations were added. The latter enables ``py::array_t`` + to/from-python conversions. + `#4674 `_ + +* ``buffer_info`` gained an ``item_type_is_equivalent_to()`` member + function. + `#4674 `_ + +* The ``capsule`` API gained a user-friendly constructor + (``py::capsule(ptr, "name", dtor)``). + `#4720 `_ + Changes: * ``PyGILState_Check()``'s in ``pybind11::handle``'s ``inc_ref()`` & @@ -46,6 +59,12 @@ Changes: sizes slightly (~1.5%) but the error messages are much more informative. `#4463 `_ +* The docstring generation for the ``std::array``-list caster was fixed. + Previously, signatures included the size of the list in a non-standard, + non-spec compliant way. The new format conforms to PEP 593. + **Tooling for processing the docstrings may need to be updated accordingly.** + `#4679 `_ + * Setter return values (which are inaccessible for all practical purposes) are no longer converted to Python (only to be discarded). `#4621 `_ @@ -58,7 +77,7 @@ Changes: signatures on C++17 and higher. `#4587 `_ -* Compatibility with Python 3.12 (alpha). Note that the minimum pybind11 +* Compatibility with Python 3.12 (beta). Note that the minimum pybind11 ABI version for Python 3.12 is version 5. (The default ABI version for Python versions up to and including 3.11 is still version 4.). `#4570 `_ @@ -69,15 +88,23 @@ Changes: types defined in the unnamed namespace. `#4319 `_ +* Python exception ``__notes__`` (introduced with Python 3.11) are now added to + the ``error_already_set::what()`` output. + `#4678 `_ + Build system improvements: +* CMake 3.27 support was added, CMake 3.4 support was dropped. + FindPython will be used if ``FindPythonInterp`` is not present. + `#4719 `_ + * Update clang-tidy to 15 in CI. `#4387 `_ * Moved the linting framework over to Ruff. `#4483 `_ -* Skip lto checks and target generation when +* Skip ``lto`` checks and target generation when ``CMAKE_INTERPROCEDURAL_OPTIMIZATION`` is defined. `#4643 `_ @@ -85,6 +112,12 @@ Build system improvements: (macOS 10.9+). `#4639 `_ +* PyPy 3.10 support was added, PyPy 3.7 support was dropped. + `#4728 `_ + +* Testing with Python 3.12 beta releases was added. + `#4713 `_ + Version 2.10.4 (Mar 16, 2023) ----------------------------- diff --git a/docs/release.rst b/docs/release.rst index e761cdf7a..4950c3b88 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -33,10 +33,12 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use - Run ``nox -s tests_packaging`` to ensure this was done correctly. - Ensure that all the information in ``setup.cfg`` is up-to-date, like supported Python versions. - - Add release date in ``docs/changelog.rst``. - - Check to make sure - `needs-changelog `_ - issues are entered in the changelog (clear the label when done). + - Add release date in ``docs/changelog.rst`` and integrate the output of + ``nox -s make_changelog``. + - Note that the ``make_changelog`` command inspects + `needs changelog `_. + - Manually clear the ``needs changelog`` labels using the GitHub web + interface (very easy: start by clicking the link above). - ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it fails due to a known flake issue, either ignore or restart CI.) - Add a release branch if this is a new minor version, or update the existing release branch if it is a patch version diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index c2e6f9ec8..27c426db5 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -11,11 +11,11 @@ #define PYBIND11_VERSION_MAJOR 2 #define PYBIND11_VERSION_MINOR 11 -#define PYBIND11_VERSION_PATCH 0.dev1 +#define PYBIND11_VERSION_PATCH 0 // Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html // Additional convention: 0xD = dev -#define PYBIND11_VERSION_HEX 0x020B00D1 +#define PYBIND11_VERSION_HEX 0x020B0000 // Define some generic pybind11 helper macros for warning management. // diff --git a/pybind11/_version.py b/pybind11/_version.py index 1cb51fc5c..1c310e0c9 100644 --- a/pybind11/_version.py +++ b/pybind11/_version.py @@ -8,5 +8,5 @@ def _to_int(s: str) -> Union[int, str]: return s -__version__ = "2.11.0.dev1" +__version__ = "2.11.0" version_info = tuple(_to_int(s) for s in __version__.split(".")) From e85696e80eb660584d5fffcb2b397eca7943f7cc Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 14 Jul 2023 14:53:58 -0700 Subject: [PATCH 2/2] Post release version bump (#4747) * Boilerplate version number update after v2.11.0 release. * Small updates to release.rst --- docs/changelog.rst | 6 ++++++ docs/release.rst | 11 +++++++---- include/pybind11/detail/common.h | 6 +++--- pybind11/_version.py | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7bb115b90..bb034d1f3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,12 @@ Changes will be added here periodically from the "Suggested changelog entry" block in pull request descriptions. +IN DEVELOPMENT +-------------- + +Changes will be summarized here periodically. + + Version 2.11.0 (July 14, 2023) ----------------------------- diff --git a/docs/release.rst b/docs/release.rst index 4950c3b88..4d390a07c 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -41,7 +41,7 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use interface (very easy: start by clicking the link above). - ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it fails due to a known flake issue, either ignore or restart CI.) -- Add a release branch if this is a new minor version, or update the existing release branch if it is a patch version +- Add a release branch if this is a new MINOR version, or update the existing release branch if it is a patch version - New branch: ``git checkout -b vX.Y``, ``git push -u origin vX.Y`` - Update branch: ``git checkout vX.Y``, ``git merge ``, ``git push`` - Update tags (optional; if you skip this, the GitHub release makes a @@ -50,7 +50,9 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use - ``git push --tags``. - Update stable - ``git checkout stable`` - - ``git merge master`` + - ``git merge -X theirs vX.Y.Z`` + - ``git diff vX.Y.Z`` + - Carefully review and reconcile any diffs. There should be none. - ``git push`` - Make a GitHub release (this shows up in the UI, sends new release notifications to users watching releases, and also uploads PyPI packages). @@ -69,9 +71,10 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use - Make sure you are on master, not somewhere else: ``git checkout master`` - Update version macros in ``include/pybind11/detail/common.h`` (set PATCH to ``0.dev1`` and increment MINOR). - - Update ``_version.py`` to match + - Update ``pybind11/_version.py`` to match - Run ``nox -s tests_packaging`` to ensure this was done correctly. - - Add a spot for in-development updates in ``docs/changelog.rst``. + - If the release was a new MINOR version, add a new `IN DEVELOPMENT` + section in ``docs/changelog.rst``. - ``git add``, ``git commit``, ``git push`` If a version branch is updated, remember to set PATCH to ``1.dev1``. diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 27c426db5..61f4b3e0e 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -10,12 +10,12 @@ #pragma once #define PYBIND11_VERSION_MAJOR 2 -#define PYBIND11_VERSION_MINOR 11 -#define PYBIND11_VERSION_PATCH 0 +#define PYBIND11_VERSION_MINOR 12 +#define PYBIND11_VERSION_PATCH 0.dev1 // Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html // Additional convention: 0xD = dev -#define PYBIND11_VERSION_HEX 0x020B0000 +#define PYBIND11_VERSION_HEX 0x020C00D1 // Define some generic pybind11 helper macros for warning management. // diff --git a/pybind11/_version.py b/pybind11/_version.py index 1c310e0c9..7934b7f73 100644 --- a/pybind11/_version.py +++ b/pybind11/_version.py @@ -8,5 +8,5 @@ def _to_int(s: str) -> Union[int, str]: return s -__version__ = "2.11.0" +__version__ = "2.12.0.dev1" version_info = tuple(_to_int(s) for s in __version__.split("."))