Bump Cython to >=3.3,<3.4 - #2771
Open
juenglin wants to merge 1 commit into
Open
Conversation
Contributor
Contributor
Author
|
/ok to test 6f24210 |
juenglin
marked this pull request as ready for review
September 4, 2026 21:26
|
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.
Description
Bumps the Cython build/test pin from
>=3.2.5,<3.3to>=3.3,<3.4acrosscuda_bindings,cuda_core,cuda_pathfinder, and docs environment files.No motivating issue -- routine dependency upgrade.
Motivation
python_version < '3.15'guards to be removed once 3.15 is officially supported.prange/parallel()without releasing the GIL,pymutex.locked().Required code changes
Cython 3.3 added a new
critical_sectionmisuse warning (cython/cython#6766), promoted to a build error by ourwarning_errors=Truebuilds. It flagged three real patterns incuda_core:cuda/core/_memory/_buffer.pyx,cuda/core/_memoryview.pyx: narrowed@cython.critical_sectioncoverage to only thecdef-attribute check-and-set; Python-level construction/reads now happen outside the lock, since the lock never actually protected them (see cython/cython#7324 for upstream discussion of this exact limitation).cuda/core/_device_resources.pyx:WorkqueueResourceOptionsnow uses@dataclass(init=False)with a hand-written__init__, because Cython 3.3 unconditionally wraps dataclass-generated__init__in a critical section and then warns about its own generated call to__post_init__.Two
cuda_bindingstests (test_eglFrame,test_cudart_eglFrame) were updated to passCUarray/cudaArray_tobjects instead of raw ints, because Cython 3.3 now enforces declared container item types (list[CUarray]) at runtime. The setter's type annotation comes from generated code; the code generator may want to revisit it separately.Build times
Clean full-rebuild times (cache disabled, median of 3 runs) are essentially unchanged between Cython 3.2.9 and 3.3.0 for both
cuda_bindingsandcuda_coreon this hardware.Test parity
Identical results before/after on a local GPU (CUDA 13.2):
cuda_bindings: 552 passed / 26 skipped (+ 9 passed intests/cython)cuda_core: 3977 passed / 237 skipped / 4 xfailed (+ 1 passed intests/cython)Known follow-up (out of scope here)
Relocking
pixi.lockforcuda_bindings/cuda_coreto reflect the new Cython pin incidentally triggers a full re-solve of the unconstraineddefaultenvironment, which also bumps its CUDA toolchain from 12.9 to 13.3 (pre-existing lock drift relative toci/versions.yml, unrelated to Cython). That drift and its long-term fix are tracked separately in #2770;pixi.lockfiles are intentionally left untouched in this PR.Checklist