[Build] Pin nanobind below 2.14.0 - #848
Merged
Merged
Conversation
nanobind 2.14.0, released 2026-08-07, requires that implicit conversion to an
integer-typed argument implement the Python __index__ protocol. numpy.bool no
longer provides it (deprecated in NumPy 2.2, removed in 2.3), so writing a
NumPy bool into an integer field from Python scope now raises TypeError out of
SNodeCxx.write_uint:
TypeError: write_uint(): incompatible function arguments.
Invoked with types: SNodeCxx, tuple, bool
The requirement was unbounded, so every build since that release picks it up.
It breaks on Python 3.11+ only, because 3.10 caps NumPy at 2.2.6 where the
deprecated __index__ still exists; the arch is irrelevant, since the failing
write happens in Python scope.
Pin until the conversion is done at the call site instead, and mark both
bounds FIXME so they are not left in place indefinitely.
Co-authored-by: Cursor <cursoragent@cursor.com>
The previous wording read as waiting for the coercion to happen elsewhere. State the work to do, so whoever picks it up knows the bound comes off as part of the same change. Co-authored-by: Cursor <cursoragent@cursor.com>
The neighbouring entries carry no such description, and the FIXME below it is the only part that is not evident from the requirement itself. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainis red on Python 3.11+ for every architecture. A single test fails,tests/python/test_ast_refactor.py::test_single_compare:Nothing in this repository changed. Two unpinned dependencies intersected:
integer-typed arguments now requires that the input implement Python's
__index__protocol." Our requirement wasnanobind>=2.0.0, so buildspicked it up automatically.
__index__fromnumpy.bool(deprecated in 2.2).The test assigns into a field from Python scope with
c[i * 6] = a[i] == b[i].qd.Vectorstores its entries as a NumPy array, so the comparison yieldsnp.False_, andSNodeHostAccessorhands that straight towrite_uint:https://github.com/Genesis-Embodied-AI/quadrants/blob/main/python/quadrants/lang/field.py#L751-L755
Python 3.10 escapes because it caps NumPy at 2.2.6, where the deprecated
__index__still exists. Confirmed locally:operator.index(np.False_)0, with aDeprecationWarningTypeError: 'numpy.bool' object cannot be interpreted as an integerThis pins nanobind below 2.14.0 in both places that declare it, and marks both
bounds
FIXME.Why a pin rather than a fix
The pin unblocks CI immediately. The real fix is coercing the NumPy scalar at
the call site in
lang/field.py, which deserves its own change and its owntest; nanobind considers the old permissive behaviour a bug, so the bound
cannot stay forever. The other half of the nanobind change is latent too:
np.float32arguments used to be silently truncated and are now rejected, sothere may be more call sites than this one.
Evidence it is the nanobind version and nothing else
#842 passed this
same test on 3.11/3.12/3.13 on Aug 6 with the same NumPy 2.4.6, built against
nanobind 2.13.0. On Aug 7 the same test on the same xdist worker in the
same position fails, built against nanobind 2.14.0. A dry-run resolution of
the new constraint selects 2.13.0.
Test plan
manylinux wheels, which is exactly the set that is currently failing.
test_ast_refactor.py::test_single_comparepasses.