Repository navigation
ci(python): add 3.7 as a KTLO leg (#1633) - #1665
Merged
Merged
Conversation
The comments above `requires-python` and the classifiers list the KTLO tier as 3.8-3.10 and say 3.7 is not run. With 3.7 joining that tier as a non-blocking leg, both name 3.7-3.10, and the reason 3.6 stays out is setup-python having no build for any image still in service. Comments only; `requires-python` stays ">=3.6, <4".
…floor (#1633) `_toml_array`'s docstring justifies avoiding tomllib by calling 3.8 the `test` job's matrix floor. 3.7 joins that matrix as a KTLO leg that stops at its install step, so the floor is 3.7 while 3.8 stays the oldest leg that runs this code. The reasoning is unchanged.
The owner asked for 3.7 to join the non-blocking KTLO tier. It now runs in `test`, `integration` and `compatibility` on ubuntu-22.04, the newest image setup-python builds 3.7.17 for. 3.6 stays out: its builds exist only for retired images. pcapkit cannot run on 3.7 (pytest>=8 needs 3.8; the sources use 3.8 syntax), so the legs are red by design and now fail fast and legibly: - the install steps annotate pip's last ERROR line, and every later step of `test`/`integration` needs `steps.install.outcome == 'success'`; the install needs setup-python's outcome too, so a lost interpreter cannot be swapped for the image's own `python`; - Compat's "Verify package" annotates the compile or import failure. Non-blocking still comes only from `continue-on-error`. ubuntu-22.04 retires on 2027-04-17 after brownouts from 2027-03-23; a brownout fails a leg before any step, which blocks `Required checks passed`, so these legs must go before then. New TestPython37IsKTLO runs the edited steps with `python` stubbed.
…how red (#1633) - pep.rst and lint.yml:163 still named the KTLO tier 3.8-3.10. - test_annotation_names.py and test_pyshark_encap_map.py called 3.8 CI's floor; it is the oldest leg that runs the suite, as 3.7's cannot install. - workflows.rst and pyproject.toml called every 3.7 leg red. Only Compat's is: its continue-on-error is job-level, and the test and integration legs conclude success with one failed step.
The runner splits a workflow command's properties on "," before it
unescapes %2C (actions/runner src/Runner.Common/ActionCommand.cs:100), so
title=... (KTLO, non-blocking) showed as "... (KTLO".
- The 3.7 install and verify steps expand ${LEG//,/%2C} into their titles.
- engine-tests' 3.10 cell and transient-install titles escape their commas.
- test_python_matrix_tiers_1633.py ports the runner's parser, checks the
3.7 titles through it, scans every workflow's annotations for a comma that
would cut one, and denies the stale 3.8-floor and "red by design" claims.
Owner
Author
|
Verdict: GOOD TO GO at Round 2 rebased onto
The reviewer checked this with 15 single-point mutations, and the tests caught every one. Risk, tracked on #1660: Closes #1633 on merge. |
Contributor
|
Coverage: 89.68% (unit tier, Python 3.14,
Per-file detail: the |
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
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeAdded 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
What. 3.7 joins the KTLO tier in
test,integrationand Compat (unit-tests.yml:92,355,python-compatibility.yml:55) onubuntu-22.04, the newest image setup-python builds 3.7.17 for. 3.6 stays out: its builds exist only for the retired 18.04 and 20.04 images. The new names end in(KTLO), so none matches a context ruleset 23497679 requires.Fails fast, and says why. Measured on CPython 3.7.16:
pip install -e '.[test,…]'fails withNo matching distribution found for pytest>=8;pip install -e .succeeds, then 41 modules fail compileall. The install steps annotate pip's last ERROR line, and every later step needssteps.install.outcome == 'success'; the install needssteps.python.outcome, so a failed setup-python cannot fall back to the image'spython. Compat'sVerify packageannotates the first compile error. Only Compat's 3.7 leg shows red (job-levelcontinue-on-error); thetestandintegrationlegs conclude success, a failed step and its annotation inside. Nothing uses|| true.Annotation titles. The runner splits a command's properties on
,before unescaping (actions/runnersrc/Runner.Common/ActionCommand.cs:100at 5f0b3ddcc), sotitle=… (KTLO, non-blocking)showed as… (KTLO. Every title now escapes,as%2C, including two existing ones inengine-tests(unit-tests.yml:860,933).Risk.
ubuntu-22.04is deprecated: brownouts from 2027-03-23, retirement on 2027-04-17 (actions/runner-images#14254). A brownout fails atestorintegrationleg before any step runs, out ofcontinue-on-error's reach, soRequired checks passedgoes red. #1660's runner-retirement monitor tracks this, and must take 3.7 out oftestandintegrationbefore the first brownout. Deprecated images already queue longer at peak hours, so a waiting 3.7 leg can also delayRequired checks passedwithout failing it.Tests.
TestPython37IsKTLO(6 tests) runs the edited steps withpythonstubbed and parses each annotation as the runner does;TestNoAnnotationTitleIsCutAtAComma(2) scans every workflow's annotations.RETIRED_CLAIMSgains the stale 3.8-floor and "red by design" phrasings, fixed inpep.rst,lint.yml,pyproject.toml,workflows.rstand two test comments. Against origin/main the new and extended checks give 29 failed (27 +test_ci_timing's 2); all pass here.requires-pythonis unchanged.Closes #1633