Skip to content

Manage installed Python build variants independently - #863

Closed
zaniebot wants to merge 12 commits into
zb/python-build-variant-consistencyfrom
zb/python-build-variant-management
Closed

zaniebot wants to merge 12 commits into
zb/python-build-variant-consistencyfrom
zb/python-build-variant-management

Conversation

@zaniebot

Copy link
Copy Markdown
Collaborator

Installed build variants could collapse in listings, an exact stock key could also uninstall a custom sibling, and a bare reinstall failed when only a non-default build was installed. Match full keys by exact build identity, list each installed build, and derive bare reinstalls from installed keys. For example, uv python uninstall cpython-3.13.7-macos-aarch64-none leaves cpython-3.13.7+custom-macos-aarch64-none intact, while uv python reinstall refreshes both when both are installed.

@zaniebot
zaniebot force-pushed the zb/python-build-variant-management branch from bdbdba7 to 777d497 Compare August 26, 2026 02:36
@zaniebot
zaniebot force-pushed the zb/python-build-variant-management branch from 777d497 to f6b38c4 Compare August 26, 2026 13:15
@zaniebot
zaniebot marked this pull request as draft August 26, 2026 13:35
@zaniebot
zaniebot force-pushed the zb/python-build-variant-management branch from f6b38c4 to 3b09b26 Compare August 26, 2026 15:14
@zaniebot
zaniebot force-pushed the zb/python-build-variant-management branch 2 times, most recently from 0266e47 to c97fea2 Compare August 26, 2026 16:13
@astral-automations-bot astral-automations-bot Bot added bug Something isn't working area:uv-python Related to the uv python interface labels Aug 28, 2026
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from c97fea2 to eeee56d Compare September 8, 2026 18:58
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch 2 times, most recently from 074b70f to f13407f Compare September 8, 2026 20:08
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from f13407f to 97832a7 Compare September 9, 2026 13:43
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from 97832a7 to 7acbcc4 Compare September 9, 2026 13:50
@zaniebot zaniebot added priority:2 Important: bounded correctness, release reliability, committed work, or proven performance gains. size:2 Moderate: one subsystem with meaningful invariants, edge cases, or operational evidence to inspect. risk:3 Credible risk of meaningful incorrect behavior or regression; bounded or recoverable. labels Sep 9, 2026
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch 2 times, most recently from e316d0f to dc55fa6 Compare September 14, 2026 14:21
@codspeed

codspeed Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 25 untouched benchmarks


Comparing zb/python-build-variant-management (7959016) with zb/python-build-variant-consistency (f1f77f7)

Open in CodSpeed

@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from 79fe743 to 650cdb9 Compare September 16, 2026 19:39
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch 3 times, most recently from f175cd3 to 5e0bd89 Compare September 16, 2026 20:27
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch 4 times, most recently from 1c3616d to 554c7ac Compare September 16, 2026 21:40
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from 554c7ac to ab86fe7 Compare September 16, 2026 21:55
@ewdurbin
ewdurbin force-pushed the zb/python-build-variant-management branch from ab86fe7 to 6c7533b Compare September 16, 2026 22:50
zanieb and others added 12 commits September 17, 2026 13:24
Resolve replacement downloads by the exact installed key so subset tag
matching cannot select a different build variant.

Cover bare and targeted reinstalls, plus exact-key uninstalls with
additional or reordered build tags.
Treat zero-patch prereleases as exact versions when a request includes the full installation key, preserving sibling build variants during uninstall.

Cover full and normalized prerelease keys and retain broad tag matching for version-only requests.
Warn and preserve installed builds missing from the download catalog while continuing to reinstall available builds. Keep explicit unavailable requests and other errors fatal.

Reuse exact reinstall requests and cover mixed availability, explicit unavailable requests, and the case where every installed build is unavailable.
Create missing minor-version links before installing executable aliases so builds installed together can identify aliases created earlier in the command. Defer updates to existing links until ownership checks finish.

Keep fixed-patch aliases pointing directly at their installations when repairing missing minor-version links, while preserving upgrade no-ops.

Add coverage for stock and custom builds, free-threaded runtimes, missing links, and repeated patch installs.
Adjust the expected error line numbers for malformed default and build_variant fields after adding the stock Python record to the catalog fixture.
Use the original request to distinguish complete installation keys from version requests before selecting installations for reinstall.

Reuse exact-key matching for complete keys and cover stock/custom selection without narrowing plain version requests.
Verify that partial build tag requests leave composite installations
untouched. Exercise reordered tags in version-based uninstalls,
prerelease uninstalls, and reinstalls while keeping full keys exact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:uv-python Related to the uv python interface bug Something isn't working priority:2 Important: bounded correctness, release reliability, committed work, or proven performance gains. risk:3 Credible risk of meaningful incorrect behavior or regression; bounded or recoverable. size:2 Moderate: one subsystem with meaningful invariants, edge cases, or operational evidence to inspect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants