Skip to content

Commit

Permalink
changelog updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Dec 5, 2024
1 parent ddc7ad5 commit 86128b9
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,8 @@ case, both modules must use the same nanobind ABI version, or they will be
isolated from each other. Releases that don't explicitly mention an ABI version
below inherit that of the preceding release.

Version TBD (unreleased)
------------------------

- The ``std::variant`` type_caster now does two passes when converting from Python.
The first pass is done without implicit conversions. This fixes an issue where
``std::variant<U, T>`` might cast a Python object wrapping a ``T`` to a ``U`` if
there is an implicit conversion available from ``T`` to ``U``.

- Restored support for constructing types with an overloaded ``__new__`` that
takes no arguments, which regressed with the constructor vectorcall
acceleration that was added in nanobind 2.2.0.
(issue `#786 <https://github.com/wjakob/nanobind/issues/786>`__)
Version 2.3.0 (Dec 6, 2024)
---------------------------

- Added a function annotation :cpp:class:`nb::call_policy\<Policy\>()
<call_policy>` which supports custom function wrapping logic,
Expand All @@ -38,24 +28,43 @@ Version TBD (unreleased)
documentation for more details, important caveats, and an example policy.
(PR `#767 <https://github.com/wjakob/nanobind/pull/767>`__)

- :cpp:func:`make_iterator` now accepts its iterator arguments by value,
rather than by forwarding reference, in order to eliminate the hazard
of storing a dangling C++ iterator reference in the returned Python
iterator object. (PR `#788 <https://github.com/wjakob/nanobind/pull/788>`__)
- :cpp:func:`nb::make_iterator <make_iterator>` now accepts its iterator
arguments by value, rather than by forwarding reference, in order to
eliminate the hazard of storing a dangling C++ iterator reference in the
returned Python iterator object. (PR `#788
<https://github.com/wjakob/nanobind/pull/788>`__)

- The ``std::variant`` type_caster now does two passes when converting from Python.
The first pass is done without implicit conversions. This fixes an issue where
``std::variant<U, T>`` might cast a Python object wrapping a ``T`` to a ``U`` if
there is an implicit conversion available from ``T`` to ``U``.
(issue `#769 <https://github.com/wjakob/nanobind/issues/769>`__)

- Restored support for constructing types with an overloaded ``__new__`` that
takes no arguments, which regressed with the constructor vector call
acceleration that was added in nanobind 2.2.0.
(issue `#786 <https://github.com/wjakob/nanobind/issues/786>`__)

- Bindings for augmented assignment operators (as generated, for example, by
``.def(nb::self += nb::self)``) now return the same object in Python in the
typical case where the C++ operator returns a reference to ``*this``.
Previously, after ``a += b``, ``a`` would be replaced with a copy.
(PR `#803 <https://github.com/wjakob/nanobind/pull/803>`__)

- Added an overload to :cpp:func:`isinstance` which tests if a Python object
is an instance of a Python class. This is in addition to the existing
overload, which tests if a Python object is an instance of a bound C++ class.
- Added an overload to :cpp:func:`nb::isinstance <isinstance>` which tests if a
Python object is an instance of a Python class. This is in addition to the
existing overload, which tests if a Python object is an instance of a bound
C++ class. (PR `#805 <https://github.com/wjakob/nanobind/pull/805>`__).

- Added support for overriding static properties, such as those defined using
``def_prop_ro_static``, in subclasses. Previously this would fail with an
error.
error. (PR `#806 <https://github.com/wjakob/nanobind/pull/806>`__).

- Other minor fixes and improvements. (PRs `#771
<https://github.com/wjakob/nanobind/pull/771>`__, `#772
<https://github.com/wjakob/nanobind/pull/772>`__, `#748
<https://github.com/wjakob/nanobind/pull/748>`__, and `#753
<https://github.com/wjakob/nanobind/pull/753>`__)

Version 2.2.0 (October 3, 2024)
-------------------------------
Expand Down

0 comments on commit 86128b9

Please sign in to comment.