Skip to content

fix(mirror): keep python.org builds out of default locations - #305

Merged
CalvinAllen merged 1 commit into
mainfrom
fix/mirror/python-org-default
Nov 13, 2026
Merged

CalvinAllen merged 1 commit into
mainfrom
fix/mirror/python-org-default

Conversation

@CalvinAllen

Copy link
Copy Markdown
Contributor

Description

Follow-up to #304. python.org's mirror sources (MSIs, arm64 NuGet packages and, since #304, install-manager zips) filled a version's default location, python/<version>/<platform>, whenever python-build-standalone had no build of that version in the run. mirror-sync runs --sync-only and skips anything already mirrored, so that python.org build stayed the default for good in two cases:

  • python.org ships a release (say 3.14.11) a day before python-build-standalone does, and a sync runs in between;
  • the python-build-standalone listing fails on a day a new release is waiting. That happened on 2026-11-13: a GitHub stream error on page 7 of the releases listing.

That breaks the intent of #304 that python-build-standalone stays the default and python.org's build is opt-in with --signed. #304 made the window much wider by adding amd64 3.14+, where new releases land most often. It hasn't happened yet: every recent default (3.13.9–3.13.17, 3.14.x, 3.15.x) is python-build-standalone's.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Related Issues

Relates to #304

Changes Made

  • python.org sources publish only at python/<version>/python.org/<platform>.tar.gz (pythonOrgJob replaces pythonOrgJobs). The default location is python-build-standalone's alone.
  • No generator change was needed. For a version with no default build, assembleManifest already lists the python.org build as the default, and once python-build-standalone's build is mirrored it takes over, with python.org's as the alternate. A new test walks through that change.
  • Defaults the mirror already filled with python.org builds (3.9.13 and other older versions python-build-standalone no longer lists) are left as they are.
  • Comments and CLAUDE.md updated, including a rule never to let a python.org source write a default location.

Testing

Test Environment

  • OS: Windows 11
  • Go Version: 1.25.3 (toolchain)

Test Steps

  1. Mirror tests: every python.org job targets the python.org location. New collectJobs cases check that a python.org build never takes a default location, including when the python-build-standalone source fails.
  2. Generator test: a release with only a python.org build lists it as the default; adding python-build-standalone's build makes that the default and python.org's the alternate.
  3. go run . --runtime python --dry-run against live upstream: 578 python-build-standalone jobs, plus 181 python.org jobs (99 from MSIs, 68 from NuGet, 14 from install-manager zips). All 181 target python/<version>/python.org/, and none target a default location.

Test Results

Found 578 jobs from python-build-standalone (578 new)
Found 99 jobs from python.org MSIs (99 new)
Found 68 jobs from python.org NuGet packages (68 new)
Found 14 jobs from python.org install manager (14 new)
Total jobs to process: 759

golangci-lint: 0 issues. ./rnr check fails only on TestGlobalVersion_NoConfigFile and TestGlobalVersion_RuntimeNotInConfig in internal/config, which fail the same way on unmodified main on the machine I tested on. Nothing under src/ changed.

Checklist

  • My code follows the Google Go Style Guide
  • I have run golangci-lint run and fixed all issues (includes gofmt, govet, and 40+ linters)
  • I have run go mod tidy to clean up dependencies
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (go test ./...) (apart from the two internal/config tests above, unchanged from main)
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation (README.md, CONTRIBUTING.md, etc.) if needed
  • My changes generate no new warnings or errors
  • I have added appropriate error handling
  • I have followed conventional commit format in my commit messages

Breaking Changes

N/A

Additional Notes

  • Merge before 04:00 UTC if possible. That's the first scheduled mirror-sync run with feat(python): install python.org's signed Windows build with --signed #304's code. Without this fix it doesn't break anything today, because every default up to 3.15.2 is already mirrored, but the race stays open for the next release.
  • Separate issue: a failed python-build-standalone listing fails the whole Python job, and generate-manifests-from-r2 only runs after a successful sync. On such a day the manifests aren't regenerated.

python.org's sources filled a version's default location
(python/<version>/<platform>) whenever python-build-standalone had no
build of it in that run. A sync skips anything already mirrored, so a
release python.org shipped before python-build-standalone did, or one
mirrored on a day the python-build-standalone listing failed, kept
python.org's build as its default for good.

python.org's builds now go only to the python.org location. For a
version with no default build, the manifest generator already lists the
python.org build as the default, and python-build-standalone's build
takes over once it is mirrored. Defaults already mirrored from python.org
(3.9.13, for example) are left as they are.
@CalvinAllen
CalvinAllen merged commit dfaec18 into main Nov 13, 2026
3 checks passed
@CalvinAllen
CalvinAllen deleted the fix/mirror/python-org-default branch November 13, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant