Skip to content

feat: require Python 3.12 - #1429

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/python-312-floor
Jul 29, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/python-312-floor

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Raise PyAutoFit's minimum supported Python version to 3.12 and advertise only Python 3.12 and 3.13.

Remove the now-tautological Optax interpreter marker while preserving its existing lower bound, and replace two Python-3.7-era ABC aliases with direct typing.Protocol definitions.

Refs #1428.

API Changes

Public PyAutoFit symbols and signatures are unchanged. Installation now requires Python 3.12 or newer; internal graphical interface annotations are real typing.Protocol classes rather than ABC aliases.
See full details below.

Test Plan

  • Graphical subsystem on Python 3.12: 219 passed
  • Full Python 3.12 suite: 1559 passed, 1 skipped
  • Full Python 3.13 suite: 1559 passed, 1 skipped
  • Wheel metadata: Requires-Python >=3.12; classifiers 3.12/3.13 only; optax>=0.2.5 preserved without a Python marker
  • Curated ecosystem smoke: 57 passed, 5 parallel failures, 3 intentional skips; sequential retry passed 4/5, with only the exact previously accepted 300-second imaging/subhalo_recovery.py timeout remaining
  • Independent Claude Opus 5 review: CLEAN
  • Heart: YELLOW score 65, exact previously acknowledged campaign reason set, no RED

Validation checklist (--auto run — plan was not pre-approved)

  • Effective level: safe (header: supervised, cap: feature medium → safe)
  • Plan: on issue feat: require Python 3.12 #1428, written at start, unmodified since
  • Gate: tests 3.12 1559 passed/1 skipped + 3.13 1559 passed/1 skipped · smoke accepted identical non-causal timeout after 4/5 sequential retries passed · review CLEAN · Heart YELLOW within launch acknowledgement
  • Human: plan sound in hindsight?
  • Human: diff matches plan (no scope creep)?
  • Human: campaign merges authorized contingent on exact reviewed head and green CI
Full API Changes (for automation & release notes)

Changed Behaviour

  • Package installation now requires Python 3.12 or newer.
  • autofit.graphical.factor_graphs abstract and jacobian interface classes are genuine typing.Protocol objects. They are annotation-only, not publicly re-exported, and have no runtime consumer in PyAutoFit or downstream repositories.
  • The jax extra installs optax>=0.2.5 without an interpreter marker; this is equivalent on every supported interpreter.

Migration

  • Recreate environments on Python 3.12 or newer before installing the next PyAutoFit release.
  • External code importing the internal FactorInterface classes should use them as static protocols, not instantiate them or apply isinstance checks.

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 29, 2026
@Jammy2211
Jammy2211 merged commit 241f2d6 into main Jul 29, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/python-312-floor branch July 30, 2026 17:32
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant