Skip to content

Commit cf25557

Browse files
committed
chore: prepare 2.12.0
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 65370f3 commit cf25557

File tree

5 files changed

+132
-12
lines changed

5 files changed

+132
-12
lines changed

docs/changelog.rst

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

1818

19+
New Features:
20+
21+
* ``pybind11/gil_safe_call_once.h`` was added (it needs to be included explicitly). The primary use case is GIL-safe initialization of C++ ``static`` variables.
22+
`#4877 <https://github.com/pybind/pybind11/pull/4877>`_
23+
24+
* Support move-only iterators in ``py::make_iterator``, ``py::make_key_iterator``, ``py::make_value_iterator``.
25+
`#4834 <https://github.com/pybind/pybind11/pull/4834>`_
26+
27+
* Two simple ``py::set_error()`` functions were added and the documentation was updated accordingly. In particular, ``py::exception<>::operator()`` was deprecated (use one of the new function instead). The
28+
documentation for ``py::exception<>`` was further updated to not suggest code that may result in undefined behavior.
29+
`#4772 <https://github.com/pybind/pybind11/pull/4772>`_
30+
31+
Bug fixes:
32+
33+
* ``pybind11`` now supports compiling for NumPy 2. The required changes are
34+
small and should not matter to most projects. However, if you experience
35+
issues you can use ``#define PYBIND11_NUMPY_1_ONLY`` to disable the new
36+
support for now.
37+
`#5050 <https://github.com/pybind/pybind11/pull/5050>`_
38+
39+
* Removes potential for Undefined Behavior during process teardown.
40+
`#4897 <https://github.com/pybind/pybind11/pull/4897>`_
41+
42+
* Improve compatibility with the nvcc compiler (especially CUDA 12.1/12.2).
43+
`#4893 <https://github.com/pybind/pybind11/pull/4893>`_
44+
45+
* ``pybind11/numpy.h`` now imports NumPy's ``multiarray`` and ``_internal`` submodules with paths depending on the version of installed NumPy (handling change in NumPy 2.0).
46+
`#4857 <https://github.com/pybind/pybind11/pull/4857>`_
47+
48+
* Builtins collections names in docstrings are now consistently rendered in lowercase (list, set, dict, tuple), in accordance with PEP 585.
49+
`#4833 <https://github.com/pybind/pybind11/pull/4833>`_
50+
51+
* Added ``py::typing::Iterator<T>``, ``py::typing::Iterable<T>``.
52+
`#4832 <https://github.com/pybind/pybind11/pull/4832>`_
53+
54+
* Render ``py::function`` as ``Callable`` in docstring.
55+
`#4829 <https://github.com/pybind/pybind11/pull/4829>`_
56+
57+
* Also bump ``PYBIND11_INTERNALS_VERSION`` for MSVC, which unlocks two new features without creating additional incompatibilities.
58+
`#4819 <https://github.com/pybind/pybind11/pull/4819>`_
59+
60+
* Guard against crashes/corruptions caused by modules built with different MSVC versions.
61+
`#4779 <https://github.com/pybind/pybind11/pull/4779>`_
62+
63+
* A long-standing bug in the handling of Python multiple inheritance was fixed. See PR #4762 for the rather complex details.
64+
`#4762 <https://github.com/pybind/pybind11/pull/4762>`_
65+
66+
* Fix ``bind_map`` with ``using`` declarations.
67+
`#4952 <https://github.com/pybind/pybind11/pull/4952>`_
68+
69+
70+
* Render typed iterators for ``make_iterator``, ``make_key_iterator``, ``make_value_iterator``.
71+
`#4876 <https://github.com/pybind/pybind11/pull/4876>`_
72+
73+
* Change docstring render for ``py::buffer``, ``py::sequence`` and ``py::handle`` (to ``Buffer``, ``Sequence``, ``Any``).
74+
`#4831 <https://github.com/pybind/pybind11/pull/4831>`_
75+
76+
* Fixed ``base_enum.__str__`` docstring.
77+
`#4827 <https://github.com/pybind/pybind11/pull/4827>`_
78+
79+
* Enforce single line docstring signatures.
80+
`#4735 <https://github.com/pybind/pybind11/pull/4735>`_
81+
82+
* Special 'typed' wrappers now available in typing.h to annotate tuple, dict, list, set, and function.
83+
`#4259 <https://github.com/pybind/pybind11/pull/4259>`_
84+
85+
86+
* Fix FindPython mode exports & avoid ``pkg_resources`` if ``importlib.metadata`` available.
87+
`#4941 <https://github.com/pybind/pybind11/pull/4941>`_
88+
89+
* ``Python_ADDITIONAL_VERSIONS`` (classic search) now includes 3.12.
90+
`#4909 <https://github.com/pybind/pybind11/pull/4909>`_
91+
92+
* ``pybind11.pc`` is now relocatable by default as long as install destinations are not absolute paths.
93+
`#4830 <https://github.com/pybind/pybind11/pull/4830>`_
94+
95+
* Correctly detect CMake FindPython removal when used as a subdirectory.
96+
`#4806 <https://github.com/pybind/pybind11/pull/4806>`_
97+
98+
* Don't require the libs component on CMake 3.18+ when using PYBIND11_FINDPYTHON (fixes manylinux builds).
99+
`#4805 <https://github.com/pybind/pybind11/pull/4805>`_
100+
101+
* ``pybind11_strip`` is no longer automatically applied when ``CMAKE_BUILD_TYPE`` is unset.
102+
`#4780 <https://github.com/pybind/pybind11/pull/4780>`_
103+
104+
* Support DEBUG_POSFIX correctly for debug builds.
105+
`#4761 <https://github.com/pybind/pybind11/pull/4761>`_
106+
107+
* Hardcode lto/thin lto for Emscripten cross-compiles.
108+
`#4642 <https://github.com/pybind/pybind11/pull/4642>`_
109+
110+
Documentation:
111+
112+
* Small fix to grammar in functions.rst.
113+
`#4791 <https://github.com/pybind/pybind11/pull/4791>`_
114+
115+
* Remove upper bound in example pyproject.toml for setuptools.
116+
`#4774 <https://github.com/pybind/pybind11/pull/4774>`_
117+
118+
CI:
119+
120+
* CI: Update NVHPC to 23.5 and Ubuntu 20.04.
121+
`#4764 <https://github.com/pybind/pybind11/pull/4764>`_
122+
123+
* Test on PyPy 3.10.
124+
`#4714 <https://github.com/pybind/pybind11/pull/4714>`_
125+
126+
Other:
127+
128+
* Use new PyCode API on Python 3.12+.
129+
`#4916 <https://github.com/pybind/pybind11/pull/4916>`_
130+
131+
* Use Ruff formatter instead of Black.
132+
`#4912 <https://github.com/pybind/pybind11/pull/4912>`_
133+
134+
* An ``assert()`` was added to help Coverty avoid generating a false positive.
135+
`#4817 <https://github.com/pybind/pybind11/pull/4817>`_
136+
137+
19138
Version 2.11.1 (July 17, 2023)
20139
-----------------------------
21140

docs/release.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
3636

3737
- Run ``nox -s tests_packaging`` to ensure this was done correctly.
3838

39-
- Ensure that all the information in ``setup.cfg`` is up-to-date, like
39+
- Ensure that all the information in ``setup.cfg`` is up-to-date, like
4040
supported Python versions.
4141

42-
- Add release date in ``docs/changelog.rst`` and integrate the output of
43-
``nox -s make_changelog``.
42+
- Add release date in ``docs/changelog.rst`` and integrate the output of
43+
``nox -s make_changelog``.
4444

45-
- Note that the ``make_changelog`` command inspects
46-
`needs changelog <https://github.com/pybind/pybind11/pulls?q=is%3Apr+is%3Aclosed+label%3A%22needs+changelog%22>`_.
45+
- Note that the ``nox -s make_changelog`` command inspects
46+
`needs changelog <https://github.com/pybind/pybind11/pulls?q=is%3Apr+is%3Aclosed+label%3A%22needs+changelog%22>`_.
4747

48-
- Manually clear the ``needs changelog`` labels using the GitHub web
49-
interface (very easy: start by clicking the link above).
48+
- Manually clear the ``needs changelog`` labels using the GitHub web
49+
interface (very easy: start by clicking the link above).
5050

51-
- ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it
51+
- ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it
5252
fails due to a known flake issue, either ignore or restart CI.)
5353

5454
- Add a release branch if this is a new MINOR version, or update the existing

include/pybind11/detail/common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
#define PYBIND11_VERSION_MAJOR 2
1313
#define PYBIND11_VERSION_MINOR 12
14-
#define PYBIND11_VERSION_PATCH 0.dev1
14+
#define PYBIND11_VERSION_PATCH 0
1515

1616
// Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html
1717
// Additional convention: 0xD = dev
18-
#define PYBIND11_VERSION_HEX 0x020C00D1
18+
#define PYBIND11_VERSION_HEX 0x020C0000
1919

2020
// Define some generic pybind11 helper macros for warning management.
2121
//

pybind11/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ def _to_int(s: str) -> Union[int, str]:
88
return s
99

1010

11-
__version__ = "2.12.0.dev1"
11+
__version__ = "2.12.0"
1212
version_info = tuple(_to_int(s) for s in __version__.split("."))

tools/make_changelog.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@
6767
for cat, msgs in cats.items():
6868
if msgs:
6969
desc = cats_descr[cat]
70-
print(f"[bold]{desc}:\n" if desc else "")
70+
print(f"[bold]{desc}:\n\n" if desc else "", end="")
7171
for msg in msgs:
7272
print(Syntax(msg, "rst", theme="ansi_light", word_wrap=True))
73+
print()
7374
print()
7475

7576
if missing:

0 commit comments

Comments
 (0)