@@ -31,7 +31,95 @@ Version TBD (unreleased)
3131 and later. This feature is likely to be of **great utility ** to anyone who
3232 is working on porting large or interconnected extension modules from pybind11
3333 to nanobind. See the extensive :ref: `interoperability documentation <interop >`
34- for more details.
34+ for more details. (PR `#1140 <https://github.com/wjakob/nanobind/pull/1140 >`__).
35+
36+ Version 2.9.2 (Sep 4, 2025)
37+ ---------------------------
38+
39+ This is a patch release to fix an issue in the new recursive stub generation feature:
40+
41+ - When creating stubs for a module, the generator must decide whether to store
42+ declarations locally (e.g., in ``foo.pyi ``) or in a subdirectory (e.g., in
43+ ``foo/__init__.pyi ``). The latter is necessary, e.g., when ``foo `` contains
44+ submodules. However, the implemented submodule test was far too conservative
45+ and interpreted any imported module (e.g. ``import os ``) as a submodule. The
46+ patch release fixes this.
47+ (commit `a65e1b
48+ <https://github.com/wjakob/nanobind/commit/a65e1b36ec0670e7c8d7a3bacfa5cff425fe92fe> `__).
49+
50+ Version 2.9.1 (Sep 4, 2025)
51+ ---------------------------
52+
53+ This is a patch release to fix a regression in the CMake build system:
54+
55+ - nanobind 2.9.0 internally adopted the CMake command ``cmake_path() `` to
56+ normalize paths. This was done for cosmetic reasons, since it improves the
57+ readability of generated commands. However, ``cmake_path() `` is only
58+ available on CMake 3.20+, while nanobind officially supports CMake 3.15+.
59+ Version 2.9.1 removes the full path normalization.
60+ (commit `f703fd
61+ <https://github.com/wjakob/nanobind/commit/f703fd403aed32cd903f5cfdff414bdfd13f6430> `__).
62+
63+
64+ Version 2.9.0 (Sep 4, 2025)
65+ ---------------------------
66+
67+ - Nanobind's CMake stub generation command :cmake:command: `nanobind_add_stub `
68+ can now automatically traverse submodule hierarchies and generate :ref: `many
69+ stub files at once <stubgen_recursive_cmake>`. (PR `#1148
70+ <https://github.com/wjakob/nanobind/pull/1148> `__).
71+
72+ - Recursive stub generation now correctly organizes stub files hierarchically (e.g.
73+ ``my_ext.pyi `` versus ``my_ext/__init__.pyi ``). (commits `ad9d3fe
74+ <https://github.com/wjakob/nanobind/commit/ad9d3fe4a631b25dbef0eca54a4ac5f96f064596> `__,
75+ `620c1c1
76+ <https://github.com/wjakob/nanobind/commit/620c1c13430bed882d76d2c12efadaa4e9f3f37d> `__).
77+
78+ - The stub generator now exposes NumPy array types as ``NDArray[np.float32] ``
79+ (or similar) instead of ``Annotated[ArrayLike, dict(...)] `` to simplify
80+ type-checking. (PR `#1149 <https://github.com/wjakob/nanobind/pull/1149 >`__,
81+ commit `37dd2c
82+ <https://github.com/wjakob/nanobind/commit/37dd2c6d6a44f9657fb08c46b2d5e5c1623a1048> `__).
83+
84+ - Nanobind (finally!) correctly implements in-place updates to dicts, lists,
85+ etc. Previously, a C++ operation like
86+
87+ .. code-block :: cpp
88+
89+ nb::dict my_dict = ...;
90+ my_dict["key"] += 1;
91+
92+ performed an addition but failed to reassign the updated value to the
93+ original key. (PR `#1119 <https://github.com/wjakob/nanobind/pull/1119 >`__).
94+
95+ - When cast operations like :cpp:func: `nb::cast() <cast> ` fail to convert a
96+ value, they previously raised a generic ``std::bad_cast `` exception that
97+ loses the context of why the cast failed. When a Python error status is
98+ available, they now preferentially raise :cpp:class: `nb::python_error
99+ <python_error> `. This helps to track down issues with default argument
100+ conversion. (PR `#1137 <https://github.com/wjakob/nanobind/pull/1137 >`__).
101+
102+ - Miscellaneous minor fixes and improvements. (PRs
103+ `#1092 <https://github.com/wjakob/nanobind/pull/1092 >`__,
104+ `#1107 <https://github.com/wjakob/nanobind/pull/1107 >`__,
105+ `#1120 <https://github.com/wjakob/nanobind/pull/1120 >`__,
106+ `#1124 <https://github.com/wjakob/nanobind/pull/1124 >`__.
107+ `#1128 <https://github.com/wjakob/nanobind/pull/1128 >`__,
108+ `#1135 <https://github.com/wjakob/nanobind/pull/1135 >`__,
109+ `#1138 <https://github.com/wjakob/nanobind/pull/1138 >`__,
110+ `#1142 <https://github.com/wjakob/nanobind/pull/1142 >`__,
111+ commits
112+ `d99b3f3 <https://github.com/wjakob/nanobind/commit/d99b3f3580b6c956f04851e8ed91e7eb5f259557 >`__,
113+ `0147904 <https://github.com/wjakob/nanobind/commit/0147904cee4baaa597780b22920f8cf0577af4d6 >`__).
114+
115+ - Minor documentation tweaks. (PRs
116+ `#1109 <https://github.com/wjakob/nanobind/pull/1109 >`__,
117+ `#1108 <https://github.com/wjakob/nanobind/pull/1108 >`__,
118+ `#1114 <https://github.com/wjakob/nanobind/pull/1114 >`__,
119+ `#1117 <https://github.com/wjakob/nanobind/pull/1117 >`__,
120+ `#1134 <https://github.com/wjakob/nanobind/pull/1134 >`__,
121+ `#1132 <https://github.com/wjakob/nanobind/pull/1132 >`__,
122+ `#1090 <https://github.com/wjakob/nanobind/pull/1090 >`__).
35123
36124Version 2.8.0 (July 16, 2025)
37125-----------------------------
@@ -46,10 +134,10 @@ Version 2.8.0 (July 16, 2025)
46134 from source code literals. (PR `#1051
47135 <https://github.com/wjakob/nanobind/pull/1051> `__).
48136
49- - Added :cpp:func: `nb::dict::empty() <dict::empty> `,
137+ - Added the convenience methods :cpp:func: `nb::dict::empty() <dict::empty> `,
50138 :cpp:func: `nb::list::empty() <list::empty> `, :cpp:func: `nb::set::empty()
51- <set::empty> `, and :cpp:func: `nb::tuple::empty() <tuple::empty> ` convenience
52- methods. (PR ` #1052 <https://github.com/wjakob/nanobind/pull/1052 >`__)
139+ <set::empty> `, and :cpp:func: `nb::tuple::empty() <tuple::empty> `. (PR ` #1052
140+ <https://github.com/wjakob/nanobind/pull/1052> `__)
53141
54142- Added a :cpp:func: `nb::dict::get() <dict::get> ` function to perform
55143 dictionary lookups with a fallback value in case of failures. (commit `d38284
@@ -59,11 +147,10 @@ Version 2.8.0 (July 16, 2025)
59147 when registering modules. However, multi-interpreter extensions remain
60148 unsupported. (PR `#1059 <https://github.com/wjakob/nanobind/pull/1059 >`__).
61149
62- - Added :cpp:class: `nb::frozenset ` that wraps the Python ``frozenset `` type.
150+ - Added :cpp:class: `nb::frozenset <frozenset> ` that wraps the Python ``frozenset `` type.
63151 (PR `#1068 <https://github.com/wjakob/nanobind/pull/1068 >`__)
64152
65- - Miscellaneous fixes and improvements (
66- commits
153+ - Miscellaneous fixes and improvements (commits
67154 `d4b245 <https://github.com/wjakob/nanobind/commit/d4b245ad69f729c3d2095be4c1cb5b94810dae26 >`__,
68155 `667451 <https://github.com/wjakob/nanobind/commit/667451fb4566dcd7151d64d81e118f9ba194a889 >`__,
69156 `62fc99 <https://github.com/wjakob/nanobind/commit/62fc996018d9ea4d51af9c86cf008c2562b4eeab >`__,
0 commit comments