Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nanobind requirement from <2.5.0 to <2.6.0 #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 1, 2025

Updates the requirements on nanobind to permit the latest version.

Changelog

Sourced from nanobind's changelog.

Version 2.5.0 (Feb 2, 2025)

  • Added :cpp:class:nb::def_visitor\<..\> <def_visitor>, which can be used to define your own binding logic that operates on a :cpp:class:nb::class_\<..\> <class_> when an instance of the visitor object is passed to :cpp:func:class_::def(). This generalizes the mechanism used by :cpp:class:init, :cpp:class:new_, etc, so that you can create binding abstractions that "feel like" the built-in ones. (PR [#884](https://github.com/wjakob/nanobind/issues/884) <https://github.com/wjakob/nanobind/pull/884>__)

  • Added some special forms for :cpp:class:nb::typed\<T, Ts...\> <typed> (PR [#835](https://github.com/wjakob/nanobind/issues/835) <https://github.com/wjakob/nanobind/pull/835>__):

    • nb::typed<nb::object, T> or nb::typed<nb::handle, T> produces a parameter or return value that will be described like T in function signatures but accepts any Python object at runtime.

    • nb::typed<nb::callable, R(Args...)> produces a Python callable signature Callable[[Args...], R]; similarly, nb::typed<nb::callable, R(...)> (with a literal ellipsis) produces the Python Callable[..., R].

  • It is now possible to create Python subclasses of C++ classes that define their constructor bindings using :cpp:struct:nb::new_() <new_>. Previously, attempting to instantiate such a Python subclass would instead produce an instance of the base C++ type. Note that it is still not possible to override virtual methods in such a Python subclass, because the object returned by the :cpp:struct:new_() <new_> constructor will generally not be an instance of the alias/trampoline type. (PR [#859](https://github.com/wjakob/nanobind/issues/859) <https://github.com/wjakob/nanobind/pull/859>__)

  • Fixed the :cpp:class:nb::int_ <int_> constructor so that it casts to an integer when invoked with a floating point argument.

  • Multi-level inheritance (e.g., A → B → C) previously did not work on Python 3.12+ when a base class (e.g., A) provided a trampoline implementation. This is now fixed. (commit 92d9cb <https://github.com/wjakob/nanobind/commit/92d9cb3d62b743a9eca2d9d9d8e5fb14a1e00a2a>__).

  • A new NB_SUPPRESS_WARNINGS parameter of :cmake:command:nanobind_add_module that marks the nanobind and Python include directories as SYSTEM <https://cmake.org/cmake/help/latest/command/include_directories.html>__ include directories, which suppresses any potential warning messages originating there. This is mainly of relevance for projects that artificially raise the warning level using flags like -pedantic, -Wcast-qual, -Wsign-conversion. (PR [#868](https://github.com/wjakob/nanobind/issues/868) <https://github.com/wjakob/nanobind/pull/868>__).

  • Fixed (benign) reference leaks that could occur when std::shared_ptr<T>

... (truncated)

Commits
  • 4ccbe6e v2.5.0 release
  • 30f4200 preparations for the next release
  • 90ef5bc Improve type_caster for complex number types. (#854)
  • 6fbc99a changelog updates
  • 0c80eec Introducing option NB_SUPPRESS_WARNINGS to nanobind_add_module (#868)
  • 185afbc stubgen: Fix generated stub filename when referencing out-of-directory extens...
  • 3dfbdb1 Don't print too many "leaked instance" messages. (#883)
  • d793091 Fix race condition in free-threaded Python (fixes issue #867) (#887)
  • 89c40e1 Introduce def_visitor abstraction for objects that provide custom binding log...
  • 534fd8c Better handling for Python subclasses of types that use nb::new_() (#859)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [nanobind](https://github.com/wjakob/nanobind) to permit the latest version.
- [Changelog](https://github.com/wjakob/nanobind/blob/master/docs/changelog.rst)
- [Commits](wjakob/nanobind@v0.0.1...v2.5.0)

---
updated-dependencies:
- dependency-name: nanobind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added lang: python PRs or issues related to Python part: dependencies PRs or issues related to dependencies labels Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: python PRs or issues related to Python part: dependencies PRs or issues related to dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants