Skip to content

Support dartpy with nanobind 3 - #3452

Merged
jslee02 merged 2 commits into
mainfrom
build/nanobind-3-compatibility
Aug 26, 2026
Merged

Support dartpy with nanobind 3#3452
jslee02 merged 2 commits into
mainfrom
build/nanobind-3-compatibility

Conversation

@jslee02

@jslee02 jslee02 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Add nanobind 3 compatibility to dartpy source and isolated wheel builds while retaining nanobind 2 as the normal development lane.

Motivation / Problem

  • Update pixi lockfile #3448 temporarily constrained isolated builds to nanobind 2 so Python 3.14 wheels could recover. This follow-up implements the durable cross-major compatibility needed to remove that temporary restriction.

Changes / Key Changes

  • Accept nanobind 2.9.2 through 3.x in PEP 517 and CMake builds while keeping the default Pixi environment on nanobind 2.
  • Isolate version-sensitive cast flags, type get/put calls, lifetime handling, and trampoline differences in a small compatibility header, using public nanobind APIs where available.
  • Add polymorphic-cast and installed-wheel lifetime/trampoline regression coverage, plus compatibility-lane documentation and changelog notes.

Testing

  • pixi run lint
  • pixi run test-all (nanobind 2.14.0)
  • pixi run -e cuda test-all
  • pixi run -e py314-wheel wheel-build (isolated build resolved nanobind 3.0.0)
  • pixi run -e py314-wheel wheel-verify
  • pixi run -e py314-wheel wheel-test
  • Built wheel SHA256: f9bf1363ec88f9501e1d2c3d0bcd0e8b37946f43e4401de9d36ffa1d2d557c1f
  • Audited the declared minimum against nanobind 2.9.2 headers.
  • Local wheel-repair cannot relabel this host-built artifact because the host emits newer glibc/GCC symbols; the hosted wheel workflow is the authoritative manylinux repair check.

Breaking Changes

  • None

Related Issues / PRs (backports)


Checklist

  • Milestone set (DART 7.0 for main, branch-matching DART 6.x release milestone for the active DART 6 LTS branch)
  • CHANGELOG.md updated per docs/onboarding/changelog.md if required
  • Add unit tests for new functionality
  • Document new methods and classes
  • Add Python bindings (dartpy) if applicable

Signed-off-by: Jeongseok Lee <jslee02@gmail.com>
…atibility

Signed-off-by: Jeongseok Lee <jslee02@gmail.com>
@jslee02 jslee02 added this to the DART 7.0 milestone Aug 26, 2026
@jslee02

jslee02 commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 4891868916

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.67%. Comparing base (6d02cd1) to head (4891868).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3452   +/-   ##
=======================================
  Coverage   81.67%   81.67%           
=======================================
  Files         667      667           
  Lines       92082    92082           
=======================================
+ Hits        75209    75210    +1     
+ Misses      16873    16872    -1     
Flag Coverage Δ
unittests 81.67% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jslee02
jslee02 merged commit 63cfb4b into main Aug 26, 2026
58 checks passed
@jslee02
jslee02 deleted the build/nanobind-3-compatibility branch August 26, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant