Repository navigation
ci(python): a weekly job keeps the Python version tiers current and opens a PR (#1660) - #1716
Merged
Merged
Conversation
…pens a PR (#1660) - util/update_python_versions.py recomputes .github/python-versions.toml from python.org's release cycle, PyPy's versions.json, setup-python's versions-manifest.json and the runner-images README, for the labels the workflows run on. It rewrites the tier file line by line (a no-op run is byte-identical), regenerates the prose the audit pins, lists the renamed check runs and the ruleset edits, and holds a pre-release back. - cron-python-versions.yml: weekly and on dispatch, permissions {} by default. detect runs it and the audit with no secret; while the branch's pull request is open it skips tiers a commit ahead of main proposes, merges of main left out. pr, behind github-release, mints a release App token with contents and pull requests write, force-pushes bot/python-versions only, or recreates it once its pull request is merged or closed, and opens or updates that PR. - Workflow comments no longer restate the tiers, since that token cannot push a workflow file; coverage-comment.yml reads the leg's version from the artifact. - create-release.yml: once a version is tagged, version_check counts the wheels and conda builds in the tier file at the tag's commit, not the run's. - Tests against committed source snapshots and scratch repositories. The seven affected tests/project modules pass; the new module's 53 fail on main.
Owner
Author
|
Verdict: GOOD TO GO at
Two behaviours need your decision before this merges:
One-time setup: add Pull requests read and write to the |
Contributor
|
Coverage: 89.47% (unit tier, Python 3.15,
Per-file detail: the |
3 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests — ci(python): declare the version tiers and the latest version in one file (#1660) #1677 is Part A; nothing else on this
Followed the coding style (
make pylint,make mypy,make isort) — pylint (W/E) and mypy clean onutil/update_python_versions.py;test_isort_cleanpassesmake testpasses, and a test case covers the change — new module added; the seven affectedtests/projectmodules run, not the whole suiteAdded a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Part B of #1660:
cron-python-versions.ymlrecomputes.github/python-versions.tomlevery Monday and proposes the change as a pull request (rulings A, B and C). Design choices to check:versions.jsonand setup-python's manifest: the manifest still lists retired images and cannot say which imageubuntu-latestis.load()refuses that tier until a workflow runs non-blocking pre-release legs.detectruns the three audit modules on the rewritten tree, and the body lists what failed, to finish by hand on the branch.bot/python-versionshas an open pull request,detectreads every commit it holds ahead ofmain(a commits-only fetch, so merges ofmainare seen through and left out), and tiers already proposed there, hand edits on top or not, get no second push or approval. If the branch holds hand edits and proposes other tiers,detectfails rather than ask for an approval thatpublishwould refuse.delete_branch_on_mergeis off),detectproposes afresh andpublishrecreates the branch frommain. So a proposal closed unmerged comes back the next Monday.detectgainspull-requests: readto read that state.workflowspermission, so it cannot push one. Workflow comments name the tiers rather than restate them.version_checkcounts the wheels and conda builds in the tier file at the tag's commit. Forv1.5.0b12, which predates the file, it uses the file as ci(python): declare the version tiers and the latest version in one file (#1660) #1677 added it. Merging a new supported version therefore no longer re-runspypifor a finished release and fails fix(ci): Create Release tags main's tip at approval time, not the commit it was created for #1634's tag check.One-time setup: add Pull requests: read and write to the release App, then accept the new permission on its installation.
First run, on today's sources:
pypy3.12joins the supported tier. The ruleset needs no edit, and the audit passes.Tests:
test_python_versions_update_1660.pyholds 53 tests against 2026-10-13 snapshots of the four sources; every one fails or errors onmain.test_release_tags_the_run_sha_1634.pygains a scratch-repository class for the release counts. The seven affected modules pass on 3.14 and 3.15, and on 3.8 and 3.10 where they do not skip. actionlint reports only what it already reports onmain.Part of #1660