build: bootstrap pip>=26.0 with ISO datetime cutoff to fix Python 3.9 CI#489
Merged
Conversation
The "P3D" relative-duration form of PIP_UPLOADED_PRIOR_TO requires pip>=26.1, but pip 26.1 itself requires Python>=3.10. As a result every job running against Python 3.9 — including the test matrix and the build-n-publish step pinned to 3.9 — failed with "No matching distribution found for pip>=26.1" the moment the supply-chain guard was introduced. The failure only surfaced in PRs that touched a reporter directory, because the test job's paths-filter gate skipped the install step on unrelated pushes. Compute the cutoff as an ISO 8601 datetime in each job and lower the required pip to >=26.0, which is available on Python 3.9 through 3.13 and accepts the ISO form. The env-unset bootstrap is kept to guard against older seeded pips in fresh venvs that would reject the PIP_UPLOADED_PRIOR_TO env var as an unknown flag.
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.
Summary
After #485 introduced supply-chain protection via
PIP_UPLOADED_PRIOR_TO: "P3D", every job that actually runspip installon Python 3.9 fails:Root cause:
P3D) is only accepted bypip>=26.1.pip 26.1itself requiresPython>=3.10, so it's never resolvable on 3.9 (max available:pip 26.0.1).build-n-publishjob, which is pinned to 3.9.mainthe breakage is hidden because thetestjob'spaths-filtergate skips the install step on commits that don't touch the affected reporter directory; in any reporter PR (e.g. #488) it fires.Change
PIP_UPLOADED_PRIOR_TOenv.Compute supply-chain cutoffstep in each job that computes a fresh ISO 8601 datetime (3 days ago) and writes it to$GITHUB_ENV. ISO datetime is the original form pip 26.0 accepts and is supported on all Python versions in the matrix.pip>=26.1topip>=26.0.env -u PIP_UPLOADED_PRIOR_TObootstrap dance so a stale seeded pip in fresh venvs doesn't choke on the env var as an unknown CLI flag.Test plan