Skip to content

CI: test the supported Python window automatically - #133

Merged
Areustle merged 2 commits into
mainfrom
issue-132-python-window
Nov 30, 2026
Merged

Areustle merged 2 commits into
mainfrom
issue-132-python-window

Conversation

@Areustle

Copy link
Copy Markdown
Contributor

Closes #132.

Problem

CI hard-coded ["3.9", …, "3.14"]. ubuntu-latest (26.04) no longer ships Python 3.9, so setup-python failed and every nightly/push run went red. Every future end-of-life would break CI the same way.

Change

  • Dynamic test matrix. A new versions job runs .github/scripts/python_versions.py (stdlib only) and feeds the test matrix. It selects every CPython release that is

    • released and not end-of-life (endoflife.date),
    • installable by actions/setup-python (actions/python-versions manifest), and
    • allowed by python_requires in setup.cfg.

    Today that resolves to 3.11–3.15. Versions now leave the matrix when they reach end-of-life and join once setup-python ships them. If python_requires still admits an end-of-life release, the job emits a ::warning:: so the floor gets raised deliberately.

  • Minimum raised to 3.11 (3.9 and 3.10 are end-of-life): python_requires, classifiers (3.11–3.15), tox envs, conda recipe, and developer docs. The tomli backport is dropped; config.py imports tomllib directly.

  • Build job uses the newest supported version instead of a pinned 3.12; the publish workflow uses 3.x and the non-deprecated packages-dir input.

  • .readthedocs.yaml: Ubuntu 20.04 / Python 3.9 → Ubuntu 24.04 / Python 3.13.

Testing

  • python_versions.py checked against live data, the old >=3.9 setup.cfg (warning shown), a simulated 2027-11-15 date (3.11 drops out and the warning fires), and an unsatisfiable python_requires (exits with error).
  • Test suite: 180 passed, 1 skipped on Python 3.11 and 3.15.
  • pre-commit and actionlint pass on the changed workflows.

Not in this PR

  • Version classifiers still need a one-line --max-py-version bump in .pre-commit-config.yaml when 3.16 ships.
  • Recent macOS jobs also failed because no hosted runner picked them up before they timed out; that's runner capacity and this PR doesn't change it.
  • The manual-only conda workflows still use actions/checkout@v2.

🤖 Generated with Claude Code

Areustle and others added 2 commits November 30, 2026 17:02
Replace the hard-coded CI test matrix with a setup job that resolves it on
each run from .github/scripts/python_versions.py: every CPython release
that is released and not end-of-life (endoflife.date), installable by
actions/setup-python, and allowed by python_requires in setup.cfg. Old
versions drop out on their own instead of failing CI, and new releases
join once setup-python ships them. The job warns when python_requires
still admits an end-of-life release.

Raise python_requires to >=3.11 (3.9 and 3.10 are end-of-life), drop the
tomli backport, and update classifiers, tox envs, the conda recipe,
Read the Docs, and the developer docs to match. The build job now uses
the newest supported version, and the publish workflow uses the
non-deprecated packages-dir input.

Closes #132

Co-Authored-By: Claude Opus 5.5 <[email protected]>
h5py has no wheels for Python 3.15 yet, so pip builds it from source and
fails without the HDF5 C library. Install libhdf5 (apt on Linux, Homebrew
on macOS) and point HDF5_DIR at it, so newly released Pythons in the
window are tested before their compiled dependencies publish wheels.

Hosted macOS runners keep timing out before picking up jobs. Test every
supported version on Linux and only the oldest and newest on macOS,
cutting macOS jobs from five to two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Areustle
Areustle merged commit 313fea7 into main Nov 30, 2026
10 checks passed
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.

Fix the CI/CD pipeline to automatically support the window of supported python versions

1 participant