Skip to content

feat: require Python 3.12 #418

Closed
Closed

Description

@Jammy2211

Overview

Raise PyAutoArray's maintained Python floor to 3.12 and remove compatibility machinery that becomes unreachable at that floor. Keep the independently justified nufftax>=0.4.0,<0.5.0 constraint and all scientific behavior unchanged.

Plan

  • Raise package metadata and classifiers to Python 3.12/3.13.
  • Remove only the Python-version markers and pre-3.12 nufftax error path made obsolete by the new floor.
  • Update the corresponding tests, collection-skip wording, and contributor contract atomically.
  • Validate both supported interpreters, built metadata, downstream smoke, review, and Heart.
Detailed implementation plan

Work Classification

Library

Affected Repositories

  • PyAutoArray (primary)

Worktree root

/home/jammy/Code/PyAutoLabs/.codex-worktrees/python-312-floor

Branch Survey

Repository Current Branch Dirty?
./PyAutoArray main clean

No conflicting worktree claim exists. The earlier phase-1 crash-fix issue #416 is closed.

Suggested branch: feature/python-312-floor

Implementation Steps

  1. Update pyproject.toml to require Python >=3.12, advertise only 3.12/3.13, and remove the two now-tautological Python markers from the optional/dev nufftax requirements without changing >=0.4.0,<0.5.0.
  2. Simplify autoarray/operators/transformer.py::nufftax_exception to the supported-interpreter missing-dependency message and remove the now-unused sys import.
  3. Delete the mocked Python 3.11 exception test in test_autoarray/operators/test_transformer.py; simplify the supported-path test so it exercises the real runtime rather than mocking sys.version_info.
  4. Make test_autoarray/conftest.py skip documentation/reason version-neutral while preserving the exact import-presence behavior and DFT/pynufft exclusions.
  5. Update the floor statement in AGENTS.md.
  6. Run the complete PyAutoArray suite on Python 3.12 and 3.13; build and inspect wheel metadata; run the downstream smoke gate; obtain Review Faculty CLEAN and an admissible Heart verdict.

Key Files

  • pyproject.toml — Python floor, classifiers, and nufftax requirements.
  • autoarray/operators/transformer.py — obsolete pre-floor exception branch.
  • test_autoarray/operators/test_transformer.py — atomic branch/test cleanup.
  • test_autoarray/conftest.py — version-neutral optional-backend skip wording.
  • AGENTS.md — contributor contract.

Scope boundaries

  • Keep nufftax>=0.4.0,<0.5.0, JAX, SciPy, Astropy, TFP, and all other behavior-driven constraints unchanged.
  • No public symbol, signature, scientific behavior, workspace script, generated artifact, or release operation changes.
  • Python 3.14 and JAX 0.11 remain separate follow-ups.

Original Prompt

Click to expand starting prompt

Ok, lets remove support for anything below python3.12, do a census to make sure we simplify requriements, build server, testing, etc. Also make sure all docs are updated.

Activity

  1. Jammy2211 commented on Jul 29, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 1B autonomous checkpoint — parked at the strict smoke gate

    Implementation is complete in the local feature/python-312-floor worktree but intentionally remains uncommitted and unpushed.

    Validated:

    • Python 3.12: 929 passed (82 warnings)
    • Python 3.13 official CI-profile environment: 928 passed, 1 skipped (82 warnings)
    • Focused transformer test: 14 passed on Python 3.13
    • Wheel metadata: Requires-Python >=3.12; classifiers are 3.12/3.13 only; optional and dev nufftax requirements retain >=0.4,<0.5 with no Python marker
    • Census/diff hygiene: no intended legacy Python-floor markers remain; git diff --check passes

    Separate pre-existing finding:

    • The dev-extra Python 3.13 environment fails one legacy PyNUFFT test because pinned pynufft 2022.2.2 calls scipy.linalg.pinv2, removed in SciPy 1.17.1.
    • The identical failure reproduces on unmodified PyAutoArray main.
    • The official CI-profile Python 3.13 environment passes, so this is not caused by the Phase 1B diff and will be recorded as a separate bug.

    Curated ecosystem smoke:

    • Parallel run: 50 passed, 12 timed out, 3 intentional skips.
    • Sequential retry of all 12 timeouts: 11 passed.
    • Remaining failure: autolens_workspace_test/imaging/subhalo_recovery.py still timed out after 300 seconds.

    The same script has prior history as a known long timeout, and the Phase 1B change only raises packaging metadata and removes an unreachable pre-3.12 nufftax branch/test. Nevertheless, the autonomous ship contract does not permit me to waive a failed smoke leg. Review, Heart re-check, commit, push, and PR creation therefore did not run.

    Checkpoint question: please explicitly authorize treating this known non-causal timeout as accepted smoke evidence and resuming the ship gate, or direct a separate smoke-fix/parking decision. All dependent Python-floor phases remain queued behind Phase 1B.

  2. Jammy2211 commented on Jul 29, 2026

    @Jammy2211
    CollaboratorAuthor

    Human authorization received in the development session on 2026-07-29:

    I authorize and go on to next phase once prs are merged

    This explicitly answers the parked checkpoint by accepting autolens_workspace_test/imaging/subhalo_recovery.py exceeding the 300-second smoke limit as known, non-causal evidence for Phase 1B.

    The resumed ship gate is complete:

    • tests: Python 3.12 929 passed; Python 3.13 official profile 928 passed, 1 skipped
    • smoke: parallel 50 passed / 12 timed out / 3 intentional skips; sequential retry 11 passed / 1 known timeout, now human-accepted
    • independent review: Claude Opus 5 CLEAN on the exact byte-identical five-file diff; it rebuilt wheel metadata and reran the 929-test suite
    • Heart: YELLOW score 65, no RED, exact previously acknowledged four-reason campaign set unchanged

    Proceeding to commit, push, and pending-release PR. Merge is contemporaneously human-authorized by the quoted instruction, contingent on the exact reviewed head remaining unchanged and CI passing.

  3. Jammy2211 commented on Jul 29, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 1B merge outcome

    PyAutoArray PR #419 merged unchanged at merge commit 41c55a4 after all four CI checks passed on the exact Claude Opus 5-reviewed head ca98473.

    Delivered:

    • Requires-Python >=3.12 and only 3.12/3.13 classifiers
    • tautological nufftax Python markers removed while preserving >=0.4,<0.5
    • unsupported pre-3.12 nufftax branch and paired mocked test removed
    • supported-runtime test/conftest wording and AGENTS.md simplified

    No release was performed. Per the human instruction, the campaign now advances to Phase 1C (PyAutoFit). This issue remains open pending separate human close authorization.

  4. Jammy2211 commented on Jul 30, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 1B merged unchanged as PyAutoArray#419 (41c55a4), CI 4/4 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions