From 5b42f3e42667ef13c8610469775ec7fc6b559742 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 29 Jul 2026 12:11:26 +0100 Subject: [PATCH] feat: require Python 3.12 --- AGENTS.md | 2 +- pyproject.toml | 7 ++----- .../potential_correction/test_fit_interferometer.py | 8 +++----- .../potential_correction/test_iterative_interferometer.py | 8 +++----- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b5fc39708..39db94b60 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,7 @@ NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest t PRs must pass `pytest --cov` on the CI matrix (Python 3.12 **and** 3.13). There is no black/ruff/flake8 gate — formatting is advisory. (`requires-python` in -`pyproject.toml` is `>=3.9`.) +`pyproject.toml` is `>=3.12`.) ## Configuration & defaults diff --git a/pyproject.toml b/pyproject.toml index a27248fbd..eb0257781 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version"] description="Open-Source Strong Lensing" readme = { file = "README.md", content-type = "text/markdown" } license = { text = "MIT" } -requires-python = ">=3.9" +requires-python = ">=3.12" authors = [ { name = "James Nightingale", email = "James.Nightingale@newcastle.ac.uk" }, { name = "Richard Hayes", email = "richard@rghsoftware.co.uk" }, @@ -18,9 +18,6 @@ classifiers = [ "Topic :: Scientific/Engineering :: Physics", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13" ] @@ -75,4 +72,4 @@ testpaths = ["test_autolens"] filterwarnings = [ "ignore:cuda_plugin_extension:UserWarning", "ignore::DeprecationWarning:jax", -] \ No newline at end of file +] diff --git a/test_autolens/potential_correction/test_fit_interferometer.py b/test_autolens/potential_correction/test_fit_interferometer.py index c74f45964..e521d31bd 100644 --- a/test_autolens/potential_correction/test_fit_interferometer.py +++ b/test_autolens/potential_correction/test_fit_interferometer.py @@ -11,13 +11,11 @@ # `apply_sparse_operator` is a JAX-only code path: `InterferometerSparseOperator` # builds its FFT kernel with `jax.numpy` and projects with `jax.ops.segment_sum` -# / `jax.lax`, with no NumPy equivalent. `autonerves[jax]` gates jax to -# Python >= 3.11, so the sparse-route case cannot run on the 3.9/3.10 matrix -# legs — skip it there rather than fail. The dense-route cases stay NumPy-only -# and run everywhere, which is what those legs exist to prove. +# / `jax.lax`, with no NumPy equivalent. Skip the sparse-route case when the +# optional JAX dependency is not installed. The dense route stays NumPy-only. requires_jax = pytest.mark.skipif( importlib.util.find_spec("jax") is None, - reason="apply_sparse_operator is a JAX-only path; jax requires Python >= 3.11", + reason="apply_sparse_operator requires the optional JAX dependency", ) diff --git a/test_autolens/potential_correction/test_iterative_interferometer.py b/test_autolens/potential_correction/test_iterative_interferometer.py index d15683f08..9d93d185f 100644 --- a/test_autolens/potential_correction/test_iterative_interferometer.py +++ b/test_autolens/potential_correction/test_iterative_interferometer.py @@ -8,13 +8,11 @@ # `apply_sparse_operator` is a JAX-only code path: `InterferometerSparseOperator` # builds its FFT kernel with `jax.numpy` and projects with `jax.ops.segment_sum` -# / `jax.lax`, with no NumPy equivalent. `autonerves[jax]` gates jax to -# Python >= 3.11, so the cases below cannot run on the 3.9/3.10 matrix legs — -# skip them there rather than fail. The dense-route cases stay NumPy-only and -# run everywhere, which is what those legs exist to prove. +# / `jax.lax`, with no NumPy equivalent. Skip these cases when the optional JAX +# dependency is not installed. The dense-route cases stay NumPy-only. requires_jax = pytest.mark.skipif( importlib.util.find_spec("jax") is None, - reason="apply_sparse_operator is a JAX-only path; jax requires Python >= 3.11", + reason="apply_sparse_operator requires the optional JAX dependency", )