Skip to content

Commit c4291a7

Browse files
committed
changelog
1 parent 8d6e117 commit c4291a7

File tree

2 files changed

+67
-6
lines changed

2 files changed

+67
-6
lines changed

docs/changelog.rst

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,67 @@ case, both modules must use the same nanobind ABI version, or they will be
1515
isolated from each other. Releases that don't explicitly mention an ABI version
1616
below inherit that of the preceding release.
1717

18+
Version 2.9.0 (TBA)
19+
-------------------
20+
21+
- Nanobind's CMake stub generation command :cmake:command:`nanobind_add_stub`
22+
can now automatically traverse submodule hierarchies and generate :ref:`many
23+
stub files at once <stubgen_recursive_cmake>`. (PR `#1148
24+
<https://github.com/wjakob/nanobind/pull/1148>`__).
25+
26+
- Recursive stub generation now correctly organizes stub files hierarchically (e.g.
27+
``my_ext.pyi`` versus ``my_ext/__init__.pyi``). (commits `ad9d3fe
28+
<https://github.com/wjakob/nanobind/commit/ad9d3fe4a631b25dbef0eca54a4ac5f96f064596>`__,
29+
`620c1c1
30+
<https://github.com/wjakob/nanobind/commit/620c1c13430bed882d76d2c12efadaa4e9f3f37d>`__).
31+
32+
- The stub generator now exposes NumPy array types as ``NDArray[np.float32]``
33+
(or similar) instead of ``Annotated[ArrayLike, dict(...)]`` to simplify
34+
type-checking. (PR `#1149 <https://github.com/wjakob/nanobind/pull/1149>`__,
35+
commit `37dd2c
36+
<https://github.com/wjakob/nanobind/commit/37dd2c6d6a44f9657fb08c46b2d5e5c1623a1048>`__).
37+
38+
- Nanobind (finally!) correctly implements in-place updates to dicts, lists,
39+
etc. Previously, a C++ operation like
40+
41+
.. code-block:: cpp
42+
43+
nb::dict my_dict = ...;
44+
my_dict["key"] += 1;
45+
46+
performed an addition but failed to reassign the updated value to the
47+
original key. (PR `#1119 <https://github.com/wjakob/nanobind/pull/1119>`__).
48+
49+
- When cast operations like :cpp:func:`nb::cast() <cast>` fail to convert a
50+
value, they raise a generic ``std::bad_cast`` exception that loses the
51+
context of why the cast failed. When a Python error status is available, they
52+
now preferentially raise :cpp:class:`nb::python_error <python_error>`. This
53+
helps to track down issues with default argument conversion. (PR `#1137
54+
<https://github.com/wjakob/nanobind/pull/1137>`__).
55+
56+
- Miscellaneous minor fixes and improvements. (PRs
57+
`#1092 <https://github.com/wjakob/nanobind/pull/1092>`__
58+
`#1107 <https://github.com/wjakob/nanobind/pull/1107>`__,
59+
`#1120 <https://github.com/wjakob/nanobind/pull/1120>`__,
60+
`#1124 <https://github.com/wjakob/nanobind/pull/1124>`__.
61+
`#1128 <https://github.com/wjakob/nanobind/pull/1128>`__,
62+
`#1135 <https://github.com/wjakob/nanobind/pull/1135>`__,
63+
`#1138 <https://github.com/wjakob/nanobind/pull/1138>`__,
64+
`#1142 <https://github.com/wjakob/nanobind/pull/1142>`__,
65+
commits
66+
`d99b3f3 <https://github.com/wjakob/nanobind/commit/d99b3f3580b6c956f04851e8ed91e7eb5f259557>`__,
67+
`0147904 <https://github.com/wjakob/nanobind/commit/0147904cee4baaa597780b22920f8cf0577af4d6>`__).
68+
69+
- Minor documentation tweaks. (PRs
70+
`#1109 <https://github.com/wjakob/nanobind/pull/1109>`__,
71+
`#1108 <https://github.com/wjakob/nanobind/pull/1108>`__,
72+
`#1114 <https://github.com/wjakob/nanobind/pull/1114>`__,
73+
`#1117 <https://github.com/wjakob/nanobind/pull/1117>`__,
74+
`#1134 <https://github.com/wjakob/nanobind/pull/1134>`__,
75+
`#1132 <https://github.com/wjakob/nanobind/pull/1132>`__,
76+
`#1090 <https://github.com/wjakob/nanobind/pull/1090>`__).
77+
78+
1879
Version 2.8.0 (July 16, 2025)
1980
-----------------------------
2081

@@ -28,10 +89,10 @@ Version 2.8.0 (July 16, 2025)
2889
from source code literals. (PR `#1051
2990
<https://github.com/wjakob/nanobind/pull/1051>`__).
3091

31-
- Added :cpp:func:`nb::dict::empty() <dict::empty>`,
92+
- Added the convenience methods :cpp:func:`nb::dict::empty() <dict::empty>`,
3293
:cpp:func:`nb::list::empty() <list::empty>`, :cpp:func:`nb::set::empty()
33-
<set::empty>`, and :cpp:func:`nb::tuple::empty() <tuple::empty>` convenience
34-
methods. (PR `#1052 <https://github.com/wjakob/nanobind/pull/1052>`__)
94+
<set::empty>`, and :cpp:func:`nb::tuple::empty() <tuple::empty>`. (PR `#1052
95+
<https://github.com/wjakob/nanobind/pull/1052>`__)
3596

3697
- Added a :cpp:func:`nb::dict::get() <dict::get>` function to perform
3798
dictionary lookups with a fallback value in case of failures. (commit `d38284
@@ -41,11 +102,10 @@ Version 2.8.0 (July 16, 2025)
41102
when registering modules. However, multi-interpreter extensions remain
42103
unsupported. (PR `#1059 <https://github.com/wjakob/nanobind/pull/1059>`__).
43104

44-
- Added :cpp:class:`nb::frozenset` that wraps the Python ``frozenset`` type.
105+
- Added :cpp:class:`nb::frozenset <frozenset>` that wraps the Python ``frozenset`` type.
45106
(PR `#1068 <https://github.com/wjakob/nanobind/pull/1068>`__)
46107

47-
- Miscellaneous fixes and improvements (
48-
commits
108+
- Miscellaneous fixes and improvements (commits
49109
`d4b245 <https://github.com/wjakob/nanobind/commit/d4b245ad69f729c3d2095be4c1cb5b94810dae26>`__,
50110
`667451 <https://github.com/wjakob/nanobind/commit/667451fb4566dcd7151d64d81e118f9ba194a889>`__,
51111
`62fc99 <https://github.com/wjakob/nanobind/commit/62fc996018d9ea4d51af9c86cf008c2562b4eeab>`__,

docs/typing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ This requires several changes:
474474
The :cmake:command:`nanobind_add_stub` command has a few other options, please
475475
refer to its documentation for details.
476476

477+
.. _stubgen_recursive_cmake:
477478

478479
Recursive stub generation
479480
_________________________

0 commit comments

Comments
 (0)