Repository navigation
feat(python): install python.org's signed Windows build with --signed - #304
Merged
Merged
Conversation
Every python.org build the mirror assembles is now also published at python/<version>/python.org/<platform>.tar.gz, alongside the version's default build. collectJobs dedupes on the metadata key rather than version and platform, so python-build-standalone keeps the default location and python.org's build still gets its own. Versions python-build-standalone lacks keep getting python.org's build at the default location, as before. From 3.14 on python.org's per-component MSIs carry no OpenPGP signature, so windows-amd64 builds from 3.14 come from the zips python.org's install manager installs, verified against the SHA-256 in python.org's index-windows.json.
…ernates The manifest generator labels each Python entry with the build it is (python-build-standalone or python.org, from the source URL in its metadata) and nests the python.org build under the default entry's alternates. Released CLIs ignore both fields and install the same URL as before. The generator now probes R2 for a binary's extension when the source URL's extension is not there (a repacked install-manager zip), and its manifest assembly is a pure function with tests, which the mirror tool workflow now runs. The CLI's manifest types gain Build and Alternates. Its cache files gain a format number, and a cache written by an older CLI, which dropped the new fields, is fetched again.
On Windows, dtvem install python <version> --signed installs python.org's own build, Authenticode-signed by the Python Software Foundation, instead of python-build-standalone's unsigned one. A version python.org shipped no Windows build for is refused, naming the nearest version that has one; a partial version resolves to the newest version with a signed build, and dtvem warns when newer releases on that line have none. Bulk installs from runtimes.json take the flag too. Each install records its build in .dtvem-build.json. dtvem list shows which build each install is and whether it is signed, and dtvem list-all marks the versions with a signed build. list-all's check marks now initialise their style first; the installed marker was always empty.
This was referenced Nov 13, 2026
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.
Description
On Windows, dtvem installs python-build-standalone's build of Python, whose
python.exeis not Authenticode-signed. python.org signs every Windows binary it ships with a Python Software Foundation certificate. This adds an opt-in way to install that signed build instead, for the versions python.org shipped Windows binaries for:Without
--signed, nothing changes: same manifest entry, same URL, same download path.Type of Change
Related Issues
None.
Changes Made
Mirror (
scripts/mirror-binaries)python/<version>/python.org/<platform>.tar.gz.collectJobsnow dedupes on the metadata key instead of version+platform, so python-build-standalone keeps the default location and python.org's build still gets its own. Versions python-build-standalone lacks keep getting python.org's build at the default location, as before. Existing R2 objects are not touched (mirror-syncruns--sync-only).PythonInstallManagerSourcefor windows-amd64 from 3.14 on. From 3.14, python.org's per-component MSIs carry no OpenPGP signature, so the MSI path can't verify them. This source repacks the full-install zips python.org's install manager uses, checked against the SHA-256 in python.org'sindex-windows.json(the same level of trust as the NuGet SHA-512 check). MSIs (OpenPGP) still cover 3.5–3.13 amd64, andpythonarm64NuGet packages cover arm64.Manifest (
scripts/generate-manifests-from-r2,schemas/manifest.schema.json,src/internal/manifest)build(python-build-standaloneorpython.org, from the metadata's source URL) and nests the python.org build under the default entry'salternates. Released CLIs parse the manifest with plainjson.Unmarshal, so they ignore both fields and keep installing the entry's ownurl(covered by a test that parses the new shape with the old struct).mirror-tool.ymlgets a separate "Test manifest generator" job, so the existing job's name, and any required check on it, is unchanged.formatnumber. A cache written by an older CLI (which dropped the new fields when it re-saved the manifest) is fetched again instead of hiding the signed builds for up to 24 hours.CLI
dtvem install python <version> --signed, for single and bulk installs. A version with no python.org build is refused, naming the nearest version that has one, rather than installing an unsigned build. A partial version resolves to the newest version with a signed build. After a signed install, dtvem warns when newer releases on that line have no signed build and may carry security fixes the installed version lacks. A signed download is checked against the manifest's SHA-256.--signedis refused for other runtimes and off Windows..dtvem-build.jsonin the version's directory. For installs made before this change,dtvem listfalls back to the default build of that version in the manifest built into dtvem (default downloads don't change).list-all's check marks now calltui.GetCheckMark().tui.CheckMarkis empty until the styles initialise, so the existing "installed" marker never showed.Docs: README section "🔏 Signed Python Builds (Windows)" and CLAUDE.md.
Testing
Test Environment
go 1.23Test Steps
cmdhelpers.MIRROR_NETWORK_TESTS=1 go test -run Network_InstallManager: 14 x64 releases (3.14.0–3.15.2) found in python.org's index. The 3.14.0 build was repacked, and itspython.exeandpython314.dllareValid, signed by the Python Software Foundation.python.exeandpython39.dll.DTVEM_ROOT: the manifest cache was seeded with a python.org alternate for 3.14.0, served from a local server.install python 3.14.0 --signedinstalls it, andGet-AuthenticodeSignatureon the installedpython.exereportsValid,CN=Python Software Foundation.listshowspython.org, signed, andlist-allmarks 3.14.0, 3.12.10 and 3.9.13 as signed.install python 3.12.12 --signedis refused and names 3.12.10.install python 3.11 --signed(no signed 3.11 in the seeded manifest),node --signedand a second signed install are refused. The bulk install path behaves the same way.Test Results
golangci-lint: 0 issues. All tests pass exceptTestGlobalVersion_NoConfigFileandTestGlobalVersion_RuntimeNotInConfigininternal/config, which fail the same way on unmodifiedmainon the machine I tested on.I didn't run a real install without
--signed. Unit tests cover that it picks the same entry and downloads it the same way.Checklist
golangci-lint runand fixed all issues (includes gofmt, govet, and 40+ linters)go mod tidyto clean up dependenciesgo test ./...) (only the twointernal/configtests above fail, and they fail onmaintoo)--signedis refused off Windows)Breaking Changes
N/A. Default installs and released CLIs are unaffected.
Additional Notes
mirror-syncbuilds the python.org-location archives (about 180 the first time; later runs only add what's missing). Thengenerate-manifests-from-r2writes the labels and alternates. Until then,--signedreports that the manifest lists no signed builds.