Skip to content

CI: drop Python 3.10 and promote python.supported to ci/versions.yml - #3080

Open
leofang wants to merge 4 commits into
NVIDIA:mainfrom
leofang:ci/drop-py310
Open

leofang wants to merge 4 commits into
NVIDIA:mainfrom
leofang:ci/drop-py310

Conversation

@leofang

@leofang leofang commented Oct 12, 2026

Copy link
Copy Markdown
Member

Sibling to cupy/cupy#10383 (merged). Drops Python 3.10 across the repo and promotes a python.supported block in ci/versions.yml to serve as the single source of truth the build-wheel matrix is drawn from.

SSoT (backport of the cupy pattern)

  • ci/versions.yml — add a python block with supported: list. Mirrors the shape used by cupy's CI; keeps cuda-python and cupy aligned on how the Python matrix is declared.
  • .github/workflows/ci.yml — in the existing ci-vars job, expose PYTHON_SUPPORTED via yq -o json -I 0 '.python.supported' ci/versions.yml and pass it to every build-wheel.yml call site. The baseline-reuse yq read of build-wheel.yml's matrix (near L225) is retargeted to ci/versions.yml.
  • .github/workflows/build-wheel.yml — add python-versions input (JSON array string); matrix now sources it via fromJSON(inputs.python-versions). The dead win-arm64 && 3.10 exclude is removed with the matrix.

3.10 drops

  • python.supported lands with 3.11 .. 3.15t only.
  • ci/test-matrix.yml — the 9 PY_VER: '3.10' rows bump to '3.11'. Each row differs from the existing 3.11 rows on either LOCAL_CTK or GPU, so no cell is deduped away and overall PR-time GPU coverage is preserved.
  • All five pyproject.toml files — drop the 3.10 classifier and bump requires-python to >=3.11. Existing wheels on PyPI keep working for 3.10 users (pip resolves to the last pre-floor release).
  • cuda_bindings/pixi.toml, cuda_core/pixi.toml — drop "3.10.*" from the python feature matrix. cuda_pathfinder/pixi.toml — python = ">=3.10" → ">=3.11".
  • ruff.toml — target-version = "py310" → "py311". mypy python_version pins in cuda_core/pyproject.toml and cuda_pathfinder/pyproject.toml bump to "3.11". .pre-commit-config.yaml — drop the tomli>=1.1.0; python_version < '3.11' marker.

Cleanups unlocked by the 3.11 floor

  • cuda_core/cuda/core/typing.py — collapse the StrEnum backport shim (enum.StrEnum is stdlib on 3.11+).
  • cuda_core/pyproject.toml — drop the tomli>=1.1.0; python_version < '3.11' build-system dep, the backports.strenum; python_version < '3.11' runtime dep, and the tomli>=2; python_version < '3.11' test dep.
  • cuda_core/pixi.toml — drop the two tomli = "*" # PEP 723 parsing fallback on Python 3.10. deps.
  • cuda_core/build_hooks.py, cuda_core/tests/test_bindings_floor.py, toolshed/check_cuda_core_bindings_floor.py — replace the tomli try/except fallbacks with plain import tomllib.

pixi.lock refresh

Regenerated cuda_bindings/pixi.lock, cuda_core/pixi.lock, cuda_pathfinder/pixi.lock, benchmarks/cuda_bindings/pixi.lock, benchmarks/cuda_core/pixi.lock with pixi 0.81.0 to track the pixi.toml / pyproject.toml changes. Pixi lockfile maintenance CI is paused per #3065; the regen is included manually here so the PIXI_FROZEN=true source-test flow does not trip.

Follow-ups (not in this PR)

A couple of test-side sys.version_info >= (3, 11) branches in cuda_core/tests/test_error_handling.py and cuda_core/tests/graph/test_graph_builder.py become always-True once 3.10 is dropped. Collapsing them is pure test cleanup, kept out of this PR to limit review scope.

-- Leo's bot

Mirrors the cupy backport (cupy/cupy#10383).

SSoT:
- Add python.supported to ci/versions.yml as the canonical list the wheel
  matrix is built across (same shape used by cupy's CI).
- Thread it through ci.yml -> build-wheel.yml via a new python-versions
  input; replace the yq read of build-wheel.yml's matrix with ci/versions.yml
  in the baseline-reuse check.

3.10 drops:
- Remove 3.10 from python.supported.
- Bump the 9 PY_VER='3.10' rows in ci/test-matrix.yml to '3.11' (each
  differs from existing 3.11 rows in LOCAL_CTK or GPU, so no row is lost).
- Drop the 3.10 classifier + bump requires-python to >=3.11 across all
  five pyproject.toml files.
- Drop "3.10.*" from cuda_bindings/pixi.toml and cuda_core/pixi.toml python
  feature matrices; bump cuda_pathfinder/pixi.toml python >=3.10 to >=3.11.
- Bump ruff.toml target-version and the mypy python_version pins to 3.11.
- Drop the pre-commit tomli marker gate.

Cleanups unlocked by the 3.11 floor:
- Collapse the StrEnum backport shim in cuda_core/cuda/core/typing.py
  (3.11+ has enum.StrEnum).
- Drop the tomli build-dep and backports.strenum runtime-dep from
  cuda_core/pyproject.toml, and the tomli test dep from the test group.
- Replace tomli try/except fallbacks with a plain import tomllib in
  build_hooks.py, toolshed/check_cuda_core_bindings_floor.py, and
  cuda_core/tests/test_bindings_floor.py.

pixi.lock refresh:
- Regenerated cuda_bindings/pixi.lock, cuda_core/pixi.lock,
  cuda_pathfinder/pixi.lock, benchmarks/cuda_bindings/pixi.lock,
  benchmarks/cuda_core/pixi.lock to track the pixi.toml / pyproject.toml
  changes.
@copy-pr-bot

copy-pr-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Oct 12, 2026
…pre-commit config

- ci/test-matrix.yml: delete the 9 PY_VER='3.10' rows instead of bumping them.
- .pre-commit-config.yaml: the dangling empty 'additional_dependencies:' key under
  the check-cuda-core-bindings-floor hook was rejected by pre-commit's schema;
  remove the key.
- cuda_bindings 13.5.0 and cuda_core 1.3.0: add a Highlights section with a
  bullet noting the Python 3.10 drop (follows the 12.9.5 / 13.1.0 / 0.5.0
  precedent for the Python 3.9 drop).
- Create cuda_pathfinder 1.8.4 and cuda_python 13.5.0 release-note placeholders
  with the same bullet (the newest existing files in those two projects already
  track shipped tags).
Ruff's py311 target rules now fire on pre-existing code:
- UP017: datetime.timezone.utc -> datetime.UTC (toolshed/check_spdx.py)
- UP036: drop dead sys.version_info >= (3, 11) blocks in
  cuda_core/cuda/core/_utils/pycompat.py, cuda_core/tests/test_enum_coverage.py,
  cuda_bindings/tests/test_basics.py, and
  cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py.
- UP042: Classification(str, Enum) -> Classification(StrEnum) in
  ci/tools/classify_pixi_lockfile_freshness.py.
- I001 and ruff-format cleanups to the files touched above and the
  tomli->tomllib drop in the previous commit.
@leofang leofang self-assigned this Oct 12, 2026
@leofang leofang added PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. and removed PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. labels Oct 12, 2026
@leofang leofang changed the title ci: drop Python 3.10 and promote python.supported to ci/versions.yml CI: drop Python 3.10 and promote python.supported to ci/versions.yml Oct 12, 2026
@leofang
leofang requested review from Andy-Jost and mdboom and removed request for mdboom October 12, 2026 19:08
@leofang
leofang marked this pull request as ready for review October 12, 2026 19:08
@leofang

leofang commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Since I have to touch .github/, this PR cannot be auto- forward-/backward- ported anyway. Will just target main for now, and cherry-pick to any other branches later.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Breaking Changes
    • Python 3.10 is no longer supported. Python 3.11–3.15 are supported across the packages; experimental free-threaded builds are documented for Python 3.14 and 3.15.
    • Upgrading cuda-python from v12.6.2.post1 or earlier may fail. Uninstall the existing package before installing the new version.
  • Documentation
    • Updated installation instructions and support policies to reflect the new Python version range.

Walkthrough

The change raises the minimum supported Python version from 3.10 to 3.11 across package metadata and configuration. It removes Python 3.10 compatibility fallbacks, updates support documentation, and makes CI consume a shared Python-version list.

Changes

Python support transition

Layer / File(s) Summary
Set Python support requirements
cuda_bindings/, cuda_core/, cuda_pathfinder/, cuda_python/, cuda_python_test_helpers/, ruff.toml, samples/cuda_core/Utilities/cuda_samples_utils.py, release notes
Package metadata and build variants set Python 3.11 as the minimum. Support and installation pages list Python 3.11–3.15, and release notes announce the Python 3.10 support change. CUDA Python release notes also document a possible upgrade failure and provide uninstall-and-install steps.
Remove Python 3.10 compatibility paths
.pre-commit-config.yaml, ci/tools/*, cuda_core/, cuda_bindings/tests/test_basics.py, cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py, toolshed/*
The code and tooling import tomllib and StrEnum directly from the standard library instead of using compatibility fallbacks. Conditional tomli and backports.strenum dependencies are removed. Related enum, bindings-floor, and tooling changes are updated.
Wire supported versions into CI
.github/workflows/*, ci/versions.yml, ci/test-matrix.yml
CI reads the supported Python list from ci/versions.yml, exports it as JSON, and passes it to the reusable wheel workflow. The pull-request test matrices remove the listed Python 3.10 configurations.

Priority: ➖ Normal

Change: Other

Merge Risk: 🔵 Low · up to f9613

The nightly-installation instructions still mention a Python 3.10 artifact that the updated build matrix no longer produces. Users can choose a supported version, but the examples should be corrected.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Remove Python 3.10 from both nightly-artifact instructions. · install.rst:109

cuda_bindings/docs/source/install.rst:109
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove Python 3.10 from both nightly-artifact instructions. Both pages now state that support starts at Python 3.11. Their python310 examples direct readers to artifacts that the new wheel matrix does not build.

  • cuda_bindings/docs/source/install.rst#L109-L109: replace python310 with a supported artifact version.
  • cuda_core/docs/source/install.rst#L104-L104: replace python310 with a supported artifact version.

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 65ceeaa1-95e4-42da-b918-e582dd6d6a0a
📥 Commits

Reviewing files that changed from the base of the PR and between 632bfc4 and f961340.

⛔ Files ignored due to path filters (5)
  • benchmarks/cuda_bindings/pixi.lock is excluded by !**/*.lock
  • benchmarks/cuda_core/pixi.lock is excluded by !**/*.lock
  • cuda_bindings/pixi.lock is excluded by !**/*.lock
  • cuda_core/pixi.lock is excluded by !**/*.lock
  • cuda_pathfinder/pixi.lock is excluded by !**/*.lock
📒 Files selected for processing (38)
  • .github/workflows/build-wheel.yml
  • .github/workflows/ci.yml
  • .pre-commit-config.yaml
  • ci/test-matrix.yml
  • ci/tools/check_pixi_cuda_version.py
  • ci/tools/classify_pixi_lockfile_freshness.py
  • ci/versions.yml
  • cuda_bindings/docs/source/install.rst
  • cuda_bindings/docs/source/release/13.5.0-notes.rst
  • cuda_bindings/docs/source/support.rst
  • cuda_bindings/pixi.toml
  • cuda_bindings/pyproject.toml
  • cuda_bindings/tests/test_basics.py
  • cuda_core/build_hooks.py
  • cuda_core/cuda/core/_memory/_copy_enums.py
  • cuda_core/cuda/core/_utils/pycompat.py
  • cuda_core/cuda/core/typing.py
  • cuda_core/docs/source/conf.py
  • cuda_core/docs/source/error_handling.rst
  • cuda_core/docs/source/install.rst
  • cuda_core/docs/source/release/1.3.0-notes.rst
  • cuda_core/docs/source/support.rst
  • cuda_core/pixi.toml
  • cuda_core/pyproject.toml
  • cuda_core/tests/test_bindings_floor.py
  • cuda_core/tests/test_enum_coverage.py
  • cuda_pathfinder/docs/source/install.rst
  • cuda_pathfinder/docs/source/release/1.8.4-notes.rst
  • cuda_pathfinder/pixi.toml
  • cuda_pathfinder/pyproject.toml
  • cuda_python/docs/source/release/13.5.0-notes.rst
  • cuda_python/pyproject.toml
  • cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py
  • cuda_python_test_helpers/pyproject.toml
  • ruff.toml
  • samples/cuda_core/Utilities/cuda_samples_utils.py
  • toolshed/check_cuda_core_bindings_floor.py
  • toolshed/check_spdx.py
💤 Files with no reviewable changes (3)
  • .pre-commit-config.yaml
  • cuda_core/docs/source/conf.py
  • ci/test-matrix.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@leofang

leofang commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

/ok to test f961340

@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant