Skip to content

ci(python): add 3.7 as a KTLO leg (#1633) - #1665

Merged
JarryShaw merged 5 commits into
mainfrom
ci/1633-ktlo-python-3-7
Oct 13, 2026
Merged

JarryShaw merged 5 commits into
mainfrom
ci/1633-ktlo-python-3-7

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description of your pull request and other information

What. 3.7 joins the KTLO tier in test, integration and Compat (unit-tests.yml:92,355, python-compatibility.yml:55) on ubuntu-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 with No 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 needs steps.install.outcome == 'success'; the install needs steps.python.outcome, so a failed setup-python cannot fall back to the image's python. Compat's Verify package annotates the first compile error. Only Compat's 3.7 leg shows red (job-level continue-on-error); the test and integration legs 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/runner src/Runner.Common/ActionCommand.cs:100 at 5f0b3ddcc), so title=… (KTLO, non-blocking) showed as … (KTLO. Every title now escapes , as %2C, including two existing ones in engine-tests (unit-tests.yml:860,933).

Risk. ubuntu-22.04 is deprecated: brownouts from 2027-03-23, retirement on 2027-04-17 (actions/runner-images#14254). A brownout fails a test or integration leg before any step runs, out of continue-on-error's reach, so Required checks passed goes red. #1660's runner-retirement monitor tracks this, and must take 3.7 out of test and integration before the first brownout. Deprecated images already queue longer at peak hours, so a waiting 3.7 leg can also delay Required checks passed without failing it.

Tests. TestPython37IsKTLO (6 tests) runs the edited steps with python stubbed and parses each annotation as the runner does; TestNoAnnotationTitleIsCutAtAComma (2) scans every workflow's annotations. RETIRED_CLAIMS gains the stale 3.8-floor and "red by design" phrasings, fixed in pep.rst, lint.yml, pyproject.toml, workflows.rst and two test comments. Against origin/main the new and extended checks give 29 failed (27 + test_ci_timing's 2); all pass here. requires-python is unchanged.

Closes #1633

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.
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 13, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 6a80d52bc. This passed a Sonnet cross-review on round 2, after round 1 came back NEEDS CHANGES. I re-ran the tier, timing, annotation and queue tests myself: 25, 47, 6 and 36 passed.

Round 2 rebased onto 85e4198c8, which keeps #1656's tag-check exemption. It then:

  • fixed the last stale "3.8–3.10" ranges (pep.rst:591, lint.yml:163), now caught by RETIRED_CLAIMS;
  • escapes , as %2C in annotation titles. The runner splits properties on commas (ActionCommand.cs:100), so (KTLO, non-blocking) was cut at the comma. It also fixed two existing titles that had the same bug.
  • corrects the outcome: only Compat's 3.7 leg shows red, while the test and integration legs conclude success with a failed install step.

The reviewer checked this with 15 single-point mutations, and the tests caught every one.

Risk, tracked on #1660: ubuntu-22.04 brownouts start on 2027-03-23. A brownout fails these legs before any step runs, and the queue on a deprecated image can delay Required checks passed.

Closes #1633 on merge.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 89.68% (unit tier, Python 3.14, 6a80d52bc, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 3 20 3 95.16%
pcapkit/const 18858 954 2366 868 91.06%
pcapkit/corekit 2366 67 760 35 96.48%
pcapkit/dumpkit 275 3 100 3 98.40%
pcapkit/foundation 3030 152 1074 35 94.23%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17166 226 4580 191 98.06%
pcapkit/toolkit 1267 190 500 8 83.59%
pcapkit/utilities 494 4 146 4 98.75%
pcapkit/vendor 4409 2342 1006 157 43.25%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 1024109 into main Oct 13, 2026
49 of 50 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 13, 2026
@JarryShaw
JarryShaw deleted the ci/1633-ktlo-python-3-7 branch October 13, 2026 18:46
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(conda): the Python 3.10 conda build fails since soupsieve 3 was pinned

1 participant