Skip to content

Commit dfa0f6f

Browse files
authored
MAINT: drop Python 3.10 (#573)
Following scikit-learn/scikit-learn#32522 and scipy/scipy#22012
1 parent 22e63b2 commit dfa0f6f

File tree

6 files changed

+1016
-1428
lines changed

6 files changed

+1016
-1428
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
environment:
47-
- tests-py310
47+
- tests-py311
4848
- tests-py313
4949
- tests-numpy1
5050
- tests-backends
51-
- tests-backends-py310
51+
- tests-backends-py311
5252
- tests-nogil
5353
runs-on: [ubuntu-latest]
5454

pixi.lock

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

pyproject.toml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ authors = [
1111
description = "Extra array functions built on top of the array API standard."
1212
readme = "README.md"
1313
license.file = "LICENSE"
14-
requires-python = ">=3.10"
14+
requires-python = ">=3.11"
1515
classifiers = [
1616
"Intended Audience :: Developers",
1717
"Operating System :: OS Independent",
1818
"Programming Language :: Python",
1919
"Programming Language :: Python :: 3",
2020
"Programming Language :: Python :: 3 :: Only",
21-
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
2423
"Programming Language :: Python :: 3.13",
@@ -135,16 +134,16 @@ ipython = ">=7.33.0"
135134
[tool.pixi.feature.dev.tasks]
136135
ipython = { cmd = "ipython", description = "Launch ipython" }
137136

138-
[tool.pixi.feature.py310.dependencies]
139-
python = "~=3.10.0"
137+
[tool.pixi.feature.py311.dependencies]
138+
python = "~=3.11.0"
140139

141140
[tool.pixi.feature.py313.dependencies]
142141
python = "~=3.13.0"
143142

144143
[tool.pixi.feature.numpy1.dependencies]
145144
# Oldest NumPy version supported by scikit-learn.
146145
# Note that this is older than what SPEC0 recommends.
147-
numpy = "=1.22.0"
146+
numpy = "=1.24.1"
148147

149148
# Backends that can run on CPU-only hosts
150149
# Note: JAX and PyTorch will install CPU variants.
@@ -154,8 +153,7 @@ dask-core = ">=2025.12.0" # No distributed, tornado, etc.
154153
sparse = ">=0.17.0"
155154

156155
[tool.pixi.feature.backends.target.linux-64.dependencies]
157-
# On CPU Python 3.10, use 0.6.2
158-
# On CPU Python >=3.11, use >=0.7.0
156+
# On CPU use >=0.7.0
159157
# On GPU, use 0.6.0 (0.6.2 and 0.7.0 both segfault); see jaxlib pin below.
160158
jax = ">=0.6.0"
161159

@@ -217,18 +215,16 @@ tests-py313 = { features = ["py313", "tests"], solve-group = "py313" } # alias o
217215
# Some backends may pin numpy; use separate solve-group
218216
dev = { features = ["py313", "lint", "tests", "docs", "dev", "backends"], solve-group = "backends" }
219217
tests-backends = { features = ["py313", "tests", "backends"], solve-group = "backends" }
220-
# Note: Python 3.10 has already been dropped by some backends (like JAX),
221-
# so this is testing older versions.
222-
tests-backends-py310 = { features = ["py310", "tests", "backends"] }
218+
tests-backends-py311 = { features = ["py311", "tests", "backends"] }
223219

224220
# CUDA not available on free github actions and on some developers' PCs
225221
dev-cuda = { features = ["py313", "lint", "tests", "docs", "dev", "backends", "cuda-backends"], solve-group = "cuda" }
226222
tests-cuda = { features = ["py313", "tests", "backends", "cuda-backends"], solve-group = "cuda" }
227-
tests-cuda-py310 = { features = ["py310", "tests", "backends", "cuda-backends"] }
223+
tests-cuda-py311 = { features = ["py311", "tests", "backends", "cuda-backends"] }
228224

229225
# Ungrouped environments
230-
tests-numpy1 = ["py310", "tests", "numpy1"]
231-
tests-py310 = ["py310", "tests"]
226+
tests-numpy1 = ["py311", "tests", "numpy1"]
227+
tests-py311 = ["py311", "tests"]
232228
tests-nogil = ["nogil", "tests"]
233229

234230
# pytest
@@ -254,7 +250,7 @@ run.source = ["array_api_extra"]
254250

255251
[tool.mypy]
256252
files = ["src", "tests"]
257-
python_version = "3.10"
253+
python_version = "3.11"
258254
warn_unused_configs = true
259255
strict = true
260256
enable_error_code = ["ignore-without-code", "truthy-bool"]
@@ -273,7 +269,7 @@ disable_error_code = ["no-untyped-def"] # test(...) without -> None
273269

274270
[tool.basedpyright]
275271
include = ["src", "tests"]
276-
pythonVersion = "3.10"
272+
pythonVersion = "3.11"
277273
pythonPlatform = "All"
278274
typeCheckingMode = "all"
279275

@@ -304,7 +300,7 @@ executionEnvironments = [
304300
# Ruff
305301

306302
[tool.ruff]
307-
target-version = "py310"
303+
target-version = "py311"
308304

309305
[tool.ruff.lint]
310306
extend-select = [
@@ -349,7 +345,7 @@ ignore = [
349345
# Pylint
350346

351347
[tool.pylint]
352-
py-version = "3.10"
348+
py-version = "3.11"
353349
reports.output-format = "colorized"
354350
messages_control.disable = [
355351
"design", # ignore heavily opinionated design checks

renovate.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,10 @@
2626
"schedule": ["* * 15 * *"],
2727
"automerge": true
2828
}, {
29-
"description": "Block PRs for updates blocked on dropping Python 3.10.",
29+
"description": "Block PRs for updates blocked on dropping Python 3.11.",
3030
"matchManagers": ["pixi"],
3131
"matchUpdateTypes": ["major", "minor"],
32-
"matchPackageNames": [
33-
"numpy",
34-
"jax",
35-
"jaxlib",
36-
"sphinx",
37-
"ipython",
38-
"sphinx-autodoc-typehints",
39-
"pytorch"
40-
],
32+
"matchPackageNames": ["numpy", "sphinx", "sphinx-autodoc-typehints"],
4133
"enabled": false
4234
}, {
4335
"description": "Group Dask packages.",

src/array_api_extra/_lib/_at.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
if TYPE_CHECKING: # pragma: no cover
2323
# TODO import from typing (requires Python >=3.11)
24-
from typing_extensions import Self
24+
from typing import Self
2525

2626

2727
class _AtOp(Enum):

src/array_api_extra/_lib/_backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__all__ = ["NUMPY_VERSION", "Backend"]
1212

13-
NUMPY_VERSION = tuple(int(v) for v in np.__version__.split(".")[:3]) # pyright: ignore[reportUnknownArgumentType]
13+
NUMPY_VERSION = tuple(int(v) for v in np.__version__.split(".")[:3])
1414

1515

1616
class Backend(Enum): # numpydoc ignore=PR02

0 commit comments

Comments
 (0)