Skip to content

Commit 5fe0749

Browse files
authored
CI: drop Python 3.10 and promote python.supported to ci/versions.yml (#3080)
* ci: drop Python 3.10 and promote python.supported to ci/versions.yml 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. * ci: delete 3.10 rows from test-matrix; add release-note bullets; fix 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). * ci: apply ruff fixes unlocked by the Python 3.11 floor 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. * docs: align CUDAError docstring with error_handling.rst; drop 3.10 from install.rst example Per Andy's PR review (#3080). The CUDAError docstring in both the .pyi and the .pyx said the detail is 'appended to the message on older interpreters', which contradicts the error_handling.rst edit in this PR. Also drop 'python310' from the cuda_bindings nightly-wheel example in install.rst (and add 3.15 variants).
1 parent 9b28da6 commit 5fe0749

45 files changed

Lines changed: 1036 additions & 1053 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build-wheel.yml‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
required: false
2525
type: boolean
2626
default: false
27+
python-versions:
28+
description: "JSON-encoded array of Python versions to build (e.g. '[\"3.11\",\"3.12\"]'). ci.yml sources this from ci/versions.yml."
29+
required: true
30+
type: string
2731

2832
defaults:
2933
run:
@@ -47,20 +51,7 @@ jobs:
4751
strategy:
4852
fail-fast: false
4953
matrix:
50-
python-version:
51-
- "3.10"
52-
- "3.11"
53-
- "3.12"
54-
- "3.13"
55-
- "3.14"
56-
- "3.14t"
57-
- "3.15"
58-
- "3.15t"
59-
exclude:
60-
# CPython 3.10 has no official Windows ARM64 build (neither
61-
# nuget-cpython nor actions/setup-python's manifest carries one),
62-
# so it cannot be built or tested on win-arm64.
63-
- python-version: ${{ (inputs.host-platform == 'win-arm64' && '3.10') || '' }}
54+
python-version: ${{ fromJSON(inputs.python-versions) }}
6455
name: py${{ matrix.python-version }}
6556
runs-on: ${{ (inputs.host-platform == 'linux-64' && 'linux-amd64-cpu8') ||
6657
(inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }}
3636
WINDOWS_ARM64_SUPPORTED: ${{ steps.get-vars.outputs.windows_arm64_supported }}
3737
WINDOWS_ARM64_SINGLE_CUDA_MAJOR: ${{ steps.get-vars.outputs.windows_arm64_single_cuda_major }}
38+
PYTHON_SUPPORTED: ${{ steps.get-vars.outputs.python_supported }}
3839
steps:
3940
- name: Checkout repository
4041
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -49,6 +50,11 @@ jobs:
4950
cuda_prev_build_ver=$(yq '.cuda.prev_build.version' ci/versions.yml)
5051
echo "cuda_prev_build_ver=$cuda_prev_build_ver" >> $GITHUB_OUTPUT
5152
53+
# Flattened one-line JSON for pass-through to build-wheel.yml via
54+
# fromJSON on the receiving side.
55+
python_supported=$(yq -o json -I 0 '.python.supported' ci/versions.yml)
56+
echo "python_supported=$python_supported" >> $GITHUB_OUTPUT
57+
5258
# Windows ARM64 is available starting with CUDA 13.4.
5359
if [[ "$cuda_build_ver" =~ ^([0-9]+)\.([0-9]+)(\.|$) ]]; then
5460
cuda_build_major="${BASH_REMATCH[1]}"
@@ -222,7 +228,7 @@ jobs:
222228
done
223229
224230
cuda_version=$(yq '.cuda.build.version' ci/versions.yml)
225-
if ! python_versions=$(yq -r '.jobs.build.strategy.matrix."python-version"[]' .github/workflows/build-wheel.yml); then
231+
if ! python_versions=$(yq -r '.python.supported[]' ci/versions.yml); then
226232
unavailable
227233
fi
228234
if ! platforms=$(yq -r '.platforms[]' ci/test-matrix.yml); then
@@ -386,6 +392,7 @@ jobs:
386392
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
387393
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
388394
workplan: ${{ needs.detect-changes.outputs.workplan }}
395+
python-versions: ${{ needs.ci-vars.outputs.PYTHON_SUPPORTED }}
389396

390397
# See build-linux-64 for why build jobs are split by platform.
391398
build-linux-aarch64:
@@ -413,6 +420,7 @@ jobs:
413420
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
414421
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
415422
workplan: ${{ needs.detect-changes.outputs.workplan }}
423+
python-versions: ${{ needs.ci-vars.outputs.PYTHON_SUPPORTED }}
416424

417425
# See build-linux-64 for why build jobs are split by platform.
418426
build-windows:
@@ -440,6 +448,7 @@ jobs:
440448
cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
441449
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
442450
workplan: ${{ needs.detect-changes.outputs.workplan }}
451+
python-versions: ${{ needs.ci-vars.outputs.PYTHON_SUPPORTED }}
443452

444453
# Windows ARM64 is available starting with CUDA 13.4. Build only the current
445454
# CUDA major because no prior-major toolkit or wheel artifacts exist.
@@ -465,6 +474,7 @@ jobs:
465474
prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }}
466475
workplan: ${{ needs.detect-changes.outputs.workplan }}
467476
single-cuda-major: ${{ needs.ci-vars.outputs.WINDOWS_ARM64_SINGLE_CUDA_MAJOR == 'true' }}
477+
python-versions: ${{ needs.ci-vars.outputs.PYTHON_SUPPORTED }}
468478

469479
# NOTE: test-sdist jobs are split by platform (mirroring build-* and test-wheel-*)
470480
# so platform-specific sources (e.g. cuda_bindings/*_windows.pyx selected by

‎.pre-commit-config.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ repos:
4848
language: python
4949
files: ^(cuda_core/pyproject\.toml|ci/versions\.yml|cuda_core/cuda/core/_bindings_floor\.py|cuda_core/docs/source/.*\.rst|toolshed/check_cuda_core_bindings_floor\.py)$
5050
pass_filenames: false
51-
additional_dependencies:
52-
- "tomli>=1.1.0; python_version < '3.11'"
5351

5452
- id: check-spdx
5553
name: Check SPDX Headers

‎benchmarks/cuda_bindings/pixi.lock‎

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎benchmarks/cuda_core/pixi.lock‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ci/test-matrix.yml‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ platforms:
4141
linux:
4242
pull-request:
4343
# linux-64
44-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest' }
45-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
46-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.4.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4744
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest' }
4845
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
4946
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.4.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
@@ -63,9 +60,6 @@ linux:
6360
- { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.4.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
6461
- { ARCH: 'amd64', PY_VER: '3.15t', CUDA_VER: '13.4.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
6562
# linux-aarch64
66-
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
67-
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
68-
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.4.2', LOCAL_CTK: '0', GPU: 't4', GPU_COUNT: '1', DRIVER: 'latest' }
6963
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
7064
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' }
7165
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.4.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' }
@@ -120,9 +114,6 @@ linux:
120114
windows:
121115
pull-request:
122116
# win-64
123-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtx2080', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' }
124-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
125-
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.4.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' }
126117
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' }
127118
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' }
128119
- { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.4.2', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' }

‎ci/tools/check_pixi_cuda_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from __future__ import annotations
77

88
import sys
9+
import tomllib
910
from pathlib import Path
1011

11-
import tomllib
1212
import yaml
1313

1414
ROOT = Path(__file__).resolve().parents[2]

‎ci/tools/classify_pixi_lockfile_freshness.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import argparse
99
import sys
1010
from dataclasses import dataclass
11-
from enum import Enum
11+
from enum import StrEnum
1212

1313

14-
class Classification(str, Enum):
14+
class Classification(StrEnum):
1515
"""Possible attributions for a stale candidate lockfile."""
1616

1717
PR_INDUCED = "pr-induced"

‎ci/versions.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ cuda:
88
version: "13.4.2"
99
prev_build:
1010
version: "12.9.1"
11+
python:
12+
# Python versions the wheel matrix is built across. ci.yml reads this list
13+
# and passes it to build-wheel.yml as the `python-versions` input.
14+
supported:
15+
- "3.11"
16+
- "3.12"
17+
- "3.13"
18+
- "3.14"
19+
- "3.14t"
20+
- "3.15"
21+
- "3.15t"

‎cuda_bindings/docs/source/install.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Runtime Requirements
1010
``cuda.bindings`` supports the same platforms as CUDA. Runtime dependencies are:
1111

1212
* Linux (x86-64, arm64) and Windows (x86-64)
13-
* Python 3.10 - 3.14
13+
* Python 3.11 - 3.15
1414
* Driver: Linux (580.65.06 or later) Windows (580.88 or later)
1515
* Optionally, NVRTC, nvJitLink, nvFatBin, NVVM, cuFile, and cuDLA from CUDA Toolkit 13.x
1616

@@ -106,8 +106,8 @@ obtain the most recent build, use the following commands:
106106
$ # Install the downloaded wheel:
107107
$ pip install cuda-bindings-python312-cuda13*-linux-64-*/cuda_bindings*.whl[all]
108108
109-
Replace ``python312`` with your Python version (e.g. ``python310``, ``python311``,
110-
``python313``, ``python314``, ``python314t``). For aarch64, replace ``linux-64``
109+
Replace ``python312`` with your Python version (e.g. ``python311``,
110+
``python313``, ``python314``, ``python314t``, ``python315``, ``python315t``). For aarch64, replace ``linux-64``
111111
with ``linux-aarch64``; for Windows, use ``win-64``. Only the current CUDA
112112
major version is built on ``main``; wheels for the prior CUDA major are
113113
published from the corresponding backport branch.

0 commit comments

Comments
 (0)