Skip to content

Commit 834fc6d

Browse files
timmensclaude
andcommitted
Drop Python 3.10/3.11 support, add Python 3.14
- Update requires-python to >=3.12, add 3.14 classifier - Set Python 3.14 as default dev, typecheck, and docs version - Remove py310/py311 pixi features, CI matrix entries, and environments - Add py314 pixi feature and environments across linux, mac/win, nevergrad - Remove test-old-pandas env (pandas <2 incompatible with Python 3.12+) - Remove petsc4py upper bound pin (no 3.14 builds at <=3.23.4) - Update ruff target-version to py312 - Update publish workflow and RTD config Python versions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0af5e42 commit 834fc6d

4 files changed

Lines changed: 26 additions & 55 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
python-version:
21-
- '310'
22-
- '311'
2321
- '312'
2422
- '313'
23+
- '314'
2524
steps:
2625
- uses: actions/checkout@v4
2726
- uses: prefix-dev/setup-pixi@v0.9.4
@@ -35,7 +34,7 @@ jobs:
3534
shell: bash -el {0}
3635
run: pixi run -e test-linux-py${{ matrix.python-version }} tests-with-cov
3736
- name: Upload coverage report.
38-
if: matrix.python-version == '310'
37+
if: matrix.python-version == '312'
3938
uses: codecov/codecov-action@v4
4039
with:
4140
token: ${{ secrets.CODECOV_TOKEN }}
@@ -49,10 +48,9 @@ jobs:
4948
- macos-latest
5049
- windows-latest
5150
python-version:
52-
- '310'
53-
- '311'
5451
- '312'
5552
- '313'
53+
- '314'
5654
steps:
5755
- uses: actions/checkout@v4
5856
- uses: prefix-dev/setup-pixi@v0.9.4
@@ -65,21 +63,6 @@ jobs:
6563
- name: Run pytest
6664
shell: bash -el {0}
6765
run: pixi run -e test-py${{ matrix.python-version }} tests-fast
68-
run-tests-with-old-pandas:
69-
name: Run tests on ubuntu-latest with pandas < 2
70-
runs-on: ubuntu-latest
71-
steps:
72-
- uses: actions/checkout@v4
73-
- uses: prefix-dev/setup-pixi@v0.9.4
74-
with:
75-
pixi-version: v0.65.0
76-
cache: true
77-
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
78-
frozen: true
79-
environments: test-old-pandas
80-
- name: Run pytest
81-
shell: bash -el {0}
82-
run: pixi run -e test-old-pandas tests-fast
8366
run-tests-with-old-numpy:
8467
name: Run tests on ubuntu-latest with numpy < 2
8568
runs-on: ubuntu-latest
@@ -117,10 +100,9 @@ jobs:
117100
fail-fast: false
118101
matrix:
119102
python-version:
120-
- '310'
121-
- '311'
122103
- '312'
123104
- '313'
105+
- '314'
124106
steps:
125107
- uses: actions/checkout@v4
126108
- uses: prefix-dev/setup-pixi@v0.9.4
@@ -146,11 +128,11 @@ jobs:
146128
cache: true
147129
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
148130
frozen: true
149-
environments: test-linux-py312
131+
environments: test-linux-py314
150132
- name: Run doctest
151133
shell: bash -el {0}
152134
run: >-
153-
pixi run -e test-linux-py312
135+
pixi run -e test-linux-py314
154136
python -m doctest -v docs/source/how_to/how_to_constraints.md
155137
run-mypy:
156138
name: Run mypy

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10-
- name: Set up Python 3.10
10+
- name: Set up Python 3.12
1111
uses: actions/setup-python@v5
1212
with:
13-
python-version: '3.10'
13+
python-version: '3.12'
1414
- name: Install pypa/build
1515
run: >-
1616
python -m

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-24.04
55
tools:
6-
python: '3.12'
6+
python: '3.14'
77
jobs:
88
create_environment:
99
- asdf plugin add pixi

pyproject.toml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[project]
55
name = "optimagic"
66
description = "Tools to solve difficult numerical optimization problems."
7-
requires-python = ">=3.10"
7+
requires-python = ">=3.12"
88
dependencies = [
99
"cloudpickle",
1010
"joblib",
@@ -40,10 +40,9 @@ classifiers = [
4040
"Operating System :: MacOS :: MacOS X",
4141
"Operating System :: Microsoft :: Windows",
4242
"Operating System :: POSIX",
43-
"Programming Language :: Python :: 3.10",
44-
"Programming Language :: Python :: 3.11",
4543
"Programming Language :: Python :: 3.12",
4644
"Programming Language :: Python :: 3.13",
45+
"Programming Language :: Python :: 3.14",
4746
"Topic :: Scientific/Engineering",
4847
]
4948
authors = [
@@ -96,7 +95,7 @@ allow-direct-references = true
9695
# Ruff configuration
9796
# ======================================================================================
9897
[tool.ruff]
99-
target-version = "py310"
98+
target-version = "py312"
10099
fix = true
101100

102101
[tool.ruff.lint]
@@ -403,7 +402,7 @@ platforms = ["linux-64", "osx-arm64", "win-64"]
403402

404403
# --- Base dependencies (all environments) -------------------------------------------
405404
[tool.pixi.dependencies]
406-
python = ">=3.10,<3.14"
405+
python = ">=3.12,<3.15"
407406
# Prefer conda-forge builds for compiled scientific packages
408407
numpy = "*"
409408
scipy = ">=1.2.1"
@@ -436,14 +435,12 @@ gradient-free-optimizers = ">=1.6.0"
436435
pyswarms = "*"
437436

438437
# --- Python version features --------------------------------------------------------
439-
[tool.pixi.feature.py310.dependencies]
440-
python = "~=3.10.0"
441-
[tool.pixi.feature.py311.dependencies]
442-
python = "~=3.11.0"
443438
[tool.pixi.feature.py312.dependencies]
444439
python = "~=3.12.0"
445440
[tool.pixi.feature.py313.dependencies]
446441
python = "~=3.13.0"
442+
[tool.pixi.feature.py314.dependencies]
443+
python = "~=3.14.0"
447444

448445
# --- Feature: test (test infrastructure) ---------------------------------------------
449446
[tool.pixi.feature.test.dependencies]
@@ -475,7 +472,7 @@ mypy = "mypy"
475472
platforms = ["linux-64"]
476473
[tool.pixi.feature.linux.dependencies]
477474
jax = ">=0.4.1"
478-
petsc4py = "<=3.23.4"
475+
petsc4py = "*"
479476

480477
# --- Feature: docs -------------------------------------------------------------------
481478
[tool.pixi.feature.docs.dependencies]
@@ -500,10 +497,6 @@ intersphinx-registry = "*"
500497
build-docs = { cmd = "make html", cwd = "docs" }
501498

502499
# --- Compat features (version overrides for backward-compat CI) ---------------------
503-
[tool.pixi.feature.old-pandas.dependencies]
504-
numpy = "<2"
505-
pandas = "<2"
506-
507500
[tool.pixi.feature.old-numpy.dependencies]
508501
numpy = "<2"
509502
pandas = ">=2"
@@ -520,28 +513,24 @@ nevergrad = "*"
520513

521514
# --- Environments --------------------------------------------------------------------
522515
[tool.pixi.environments]
523-
# Default dev environment (Python 3.12, everything)
524-
default = { features = ["test", "py312"], solve-group = "py312" }
516+
# Default dev environment (Python 3.14, everything)
517+
default = { features = ["test", "py314"], solve-group = "py314" }
525518
# Linux CI (with JAX + PETSc)
526-
test-linux-py310 = { features = ["test", "linux", "py310"], solve-group = "linux-py310" }
527-
test-linux-py311 = { features = ["test", "linux", "py311"], solve-group = "linux-py311" }
528519
test-linux-py312 = { features = ["test", "linux", "py312"], solve-group = "linux-py312" }
529520
test-linux-py313 = { features = ["test", "linux", "py313"], solve-group = "linux-py313" }
521+
test-linux-py314 = { features = ["test", "linux", "py314"], solve-group = "linux-py314" }
530522
# macOS/Windows CI
531-
test-py310 = { features = ["test", "py310"], solve-group = "py310" }
532-
test-py311 = { features = ["test", "py311"], solve-group = "py311" }
533523
test-py312 = { features = ["test", "py312"], solve-group = "py312" }
534524
test-py313 = { features = ["test", "py313"], solve-group = "py313" }
535-
# Backward-compat CI (Python 3.10 only)
536-
test-old-pandas = { features = ["test", "old-pandas", "py310"] }
537-
test-old-numpy = { features = ["test", "old-numpy", "py310"] }
538-
test-old-plotly = { features = ["test", "old-plotly", "py310"] }
525+
test-py314 = { features = ["test", "py314"], solve-group = "py314" }
526+
# Backward-compat CI (Python 3.12, lowest supported)
527+
test-old-numpy = { features = ["test", "old-numpy", "py312"] }
528+
test-old-plotly = { features = ["test", "old-plotly", "py312"] }
539529
# Nevergrad CI (bayesian-optimization==1.4.0)
540-
test-nevergrad-py310 = { features = ["test", "nevergrad", "py310"] }
541-
test-nevergrad-py311 = { features = ["test", "nevergrad", "py311"] }
542530
test-nevergrad-py312 = { features = ["test", "nevergrad", "py312"] }
543531
test-nevergrad-py313 = { features = ["test", "nevergrad", "py313"] }
532+
test-nevergrad-py314 = { features = ["test", "nevergrad", "py314"] }
544533
# Type checking
545-
typecheck = { features = ["typecheck", "py310"], solve-group = "py310" }
534+
typecheck = { features = ["typecheck", "py314"], solve-group = "py314" }
546535
# Docs
547-
docs = { features = ["docs", "py312"], solve-group = "py312" }
536+
docs = { features = ["docs", "py314"], solve-group = "py314" }

0 commit comments

Comments
 (0)