From 6c8702139df92d4bd17d68c5d23815bb4d74d940 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Mon, 27 Jul 2026 20:45:23 +0100 Subject: [PATCH] fix: gate optax to python>=3.11 in the jax extra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PyAutoGalaxy#530 pointed autogalaxy[jax] at autofit[jax] so optax follows the jax chain. That was right for 3.11+, but autofit[jax] declared optax with no Python marker, while every entry in autonerves[jax] carries python_version >= '3.11'. So on 3.9/3.10 the extra suddenly asked pip to find an optax for an interpreter recent optax has no wheels for, and pip backtracked through the optax/jax release history until: error: resolution-too-deep That took every 3.9 leg of python_matrix red (PyAutoNerves, PyAutoArray, PyAutoGalaxy, PyAutoLens) — legs that were green before the merge. My regression. optax is only useful where jax is installed and jax is already gated to 3.11+, so giving optax the same marker loses nothing and restores the pre-merge resolution on 3.9/3.10. Verified in the built wheel metadata: Requires-Dist: optax>=0.2.5; python_version >= "3.11" and extra == "jax" and by marker evaluation: 3.9/3.10 -> False, 3.11/3.12/3.13 -> True. Co-Authored-By: Claude Opus 5 --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29fe3be85..4a681cd35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,13 @@ local_scheme = "no-local-version" [project.optional-dependencies] -jax = ["autonerves[jax]", "optax>=0.2.5"] +# optax carries the same `python_version >= '3.11'` marker every entry in +# autonerves[jax] does. Without it, resolving this extra on 3.9/3.10 sends pip +# backtracking through the whole optax/jax release history looking for a version +# with wheels for that interpreter — which ends in `resolution-too-deep`, taking +# every 3.9 leg of python_matrix red. optax is only useful where jax is +# installed, and jax is gated to 3.11+, so gating optax to match loses nothing. +jax = ["autonerves[jax]", "optax>=0.2.5; python_version >= '3.11'"] mcp = ["mcp"] optional = [ "autofit[jax]",