Description
Overview
Raise the PyAutoFit package floor to Python 3.12 as Phase 1C of the ecosystem migration. This removes obsolete interpreter metadata and compatibility scaffolding while preserving the existing Optax dependency lower bound and runtime behavior on supported Python versions.
Plan
- Require Python 3.12 and advertise only Python 3.12 and 3.13.
- Remove the now-tautological Optax Python marker and its stale Python 3.9/3.10 resolver explanation without loosening optax >=0.2.5.
- Replace both Python-3.7-era Protocol aliases with typing.Protocol.
- Update the repository support contract and retain focused coverage for the affected graphical interfaces.
- Validate the full suite on Python 3.12 and 3.13, built wheel metadata, curated downstream smoke tests, independent review, and Heart readiness.
Detailed implementation plan
Work Classification
Library
Affected Repositories
- PyAutoFit (primary)
PyAutoHands was inferred only from the campaign prompt folder and is explicitly excluded from this phase; build and verification tooling belongs to Phase 2.
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoFit | main at origin/main 658e452 | clean |
No competing PyAutoMind worktree claims PyAutoFit.
Suggested branch: feature/python-312-floor
Worktree root: /home/jammy/Code/PyAutoLabs/.codex-worktrees/python-312-floor
Implementation Steps
- In pyproject.toml, set requires-python to >=3.12 and remove the Python 3.9, 3.10, and 3.11 classifiers.
- In pyproject.toml, remove the Optax python_version marker and the stale multi-line resolver comment while retaining optax>=0.2.5 unchanged.
- In autofit/graphical/factor_graphs/abstract.py and jacobians.py, import typing.Protocol directly and delete the Protocol = ABC compatibility aliases; preserve ABC where AbstractNode still requires it.
- In AGENTS.md, update the documented package floor to >=3.12.
- Census the repository for stale lower-floor metadata, markers, comments, and compatibility shims; add or adjust tests only if supported-runtime behavior needs extra coverage.
- Run the complete PyAutoFit suite on Python 3.12 and 3.13, verify generated wheel metadata, run the curated ecosystem smoke surface, obtain an independent CLEAN review, and consult Heart before shipping.
Key Files
- pyproject.toml — interpreter metadata, classifiers, and Optax extra
- autofit/graphical/factor_graphs/abstract.py — graphical Protocol interfaces and AbstractNode ABC
- autofit/graphical/factor_graphs/jacobians.py — Jacobian Protocol interfaces
- AGENTS.md — repository support contract
- test_autofit/graphical/ — focused interface coverage if required
Original Prompt
Click to expand starting prompt
Python 3.12 floor — Phase 1C: PyAutoFit
Type: feature
Target: PyAutoFit
Difficulty: medium
Autonomy: supervised
Priority: high
Status: formalised
Parent: python_312_floor_phase_1_core.md
Depends on: python_312_floor_phase_1b_array.md
Scope
In @PyAutoFit, raise metadata/classifiers to 3.12/3.13, remove the now-tautological optax Python marker and its stale explanatory comment without loosening the pin, replace the two Python-3.7 Protocol = ABC shims with the direct modern definition, update tests if needed, and update AGENTS.md.
Activity
Jammy2211 commentedon Jul 29, 2026
Smoke Test Results — 2026-07-29
Sequential retry of all five parallel failures:
The only remaining failure is the exact script and timeout mode already reproduced in Phase 1B and explicitly accepted by the human as non-causal before authorizing the campaign to continue to subsequent phases. Phase 1C changes package metadata and replaces annotation-only Python-3.7 Protocol aliases; it does not touch likelihood or workspace runtime behavior. No new smoke signal is present.
Additional gates already green:
Proceeding to independent review without modifying code in response to smoke.
Jammy2211 commentedon Jul 29, 2026
Independent review and ship gate
Claude Opus 5 reviewed the exact byte-identical four-file tree at maximum effort and returned CLEAN.
Key review evidence:
Gate summary:
Proceeding to commit, push, and pending-release PR. The human has authorized campaign PR merges after the exact reviewed heads pass CI; no release is authorized.
Jammy2211 commentedon Jul 29, 2026
Phase 1C merged via PR #1429.
70d31a3e25326a704fcef4f8eb5644010603ccea241f2d69c4d8d0d1df19765431caacfcc3468da9The issue remains open as the campaign record; Phase 1D (PyAutoGalaxy) is next.
Jammy2211 commentedon Jul 30, 2026
Phase 1C merged unchanged as PyAutoFit#1429 (241f2d6), CI 5/5 green on the reviewed head. python-312-floor arc complete (record: PyAutoMind/complete/2026/07/python-312-floor.md; parent PyAutoNerves#142 closed). Closing on the same 2026-07-30 human cleanup authorization.