Skip to content

Commit ee3a767

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

File tree

5 files changed

+153
-14
lines changed

5 files changed

+153
-14
lines changed

docs/changelog.rst

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

22160
Changes:
23161

@@ -32,7 +170,7 @@ Changes:
32170

33171

34172
Version 2.11.0 (July 14, 2023)
35-
-----------------------------
173+
------------------------------
36174

37175
New features:
38176

docs/release.rst

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

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

Lines changed: 1 addition & 1 deletion
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

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