Skip to content

Commit b40fb0b

Browse files
authored
Merge pull request #664 from PyAutoLabs/feature/python-312-floor
feat: require Python 3.12
2 parents 0612f3e + 5b42f3e commit b40fb0b

4 files changed

Lines changed: 9 additions & 16 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest t
4747

4848
PRs must pass `pytest --cov` on the CI matrix (Python 3.12 **and** 3.13). There
4949
is no black/ruff/flake8 gate — formatting is advisory. (`requires-python` in
50-
`pyproject.toml` is `>=3.9`.)
50+
`pyproject.toml` is `>=3.12`.)
5151

5252
## Configuration & defaults
5353

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description="Open-Source Strong Lensing"
99
readme = { file = "README.md", content-type = "text/markdown" }
1010
license = { text = "MIT" }
11-
requires-python = ">=3.9"
11+
requires-python = ">=3.12"
1212
authors = [
1313
{ name = "James Nightingale", email = "James.Nightingale@newcastle.ac.uk" },
1414
{ name = "Richard Hayes", email = "richard@rghsoftware.co.uk" },
@@ -18,9 +18,6 @@ classifiers = [
1818
"Topic :: Scientific/Engineering :: Physics",
1919
"Natural Language :: English",
2020
"Operating System :: OS Independent",
21-
"Programming Language :: Python :: 3.9",
22-
"Programming Language :: Python :: 3.10",
23-
"Programming Language :: Python :: 3.11",
2421
"Programming Language :: Python :: 3.12",
2522
"Programming Language :: Python :: 3.13"
2623
]
@@ -75,4 +72,4 @@ testpaths = ["test_autolens"]
7572
filterwarnings = [
7673
"ignore:cuda_plugin_extension:UserWarning",
7774
"ignore::DeprecationWarning:jax",
78-
]
75+
]

test_autolens/potential_correction/test_fit_interferometer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111

1212
# `apply_sparse_operator` is a JAX-only code path: `InterferometerSparseOperator`
1313
# builds its FFT kernel with `jax.numpy` and projects with `jax.ops.segment_sum`
14-
# / `jax.lax`, with no NumPy equivalent. `autonerves[jax]` gates jax to
15-
# Python >= 3.11, so the sparse-route case cannot run on the 3.9/3.10 matrix
16-
# legs — skip it there rather than fail. The dense-route cases stay NumPy-only
17-
# and run everywhere, which is what those legs exist to prove.
14+
# / `jax.lax`, with no NumPy equivalent. Skip the sparse-route case when the
15+
# optional JAX dependency is not installed. The dense route stays NumPy-only.
1816
requires_jax = pytest.mark.skipif(
1917
importlib.util.find_spec("jax") is None,
20-
reason="apply_sparse_operator is a JAX-only path; jax requires Python >= 3.11",
18+
reason="apply_sparse_operator requires the optional JAX dependency",
2119
)
2220

2321

test_autolens/potential_correction/test_iterative_interferometer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88

99
# `apply_sparse_operator` is a JAX-only code path: `InterferometerSparseOperator`
1010
# builds its FFT kernel with `jax.numpy` and projects with `jax.ops.segment_sum`
11-
# / `jax.lax`, with no NumPy equivalent. `autonerves[jax]` gates jax to
12-
# Python >= 3.11, so the cases below cannot run on the 3.9/3.10 matrix legs —
13-
# skip them there rather than fail. The dense-route cases stay NumPy-only and
14-
# run everywhere, which is what those legs exist to prove.
11+
# / `jax.lax`, with no NumPy equivalent. Skip these cases when the optional JAX
12+
# dependency is not installed. The dense-route cases stay NumPy-only.
1513
requires_jax = pytest.mark.skipif(
1614
importlib.util.find_spec("jax") is None,
17-
reason="apply_sparse_operator is a JAX-only path; jax requires Python >= 3.11",
15+
reason="apply_sparse_operator requires the optional JAX dependency",
1816
)
1917

2018

0 commit comments

Comments
 (0)