Skip to content

Add test coverage for incorrect free-threaded Python version selection - #21124

Merged
zanieb merged 2 commits into
mainfrom
zb/reproduce-python-variant-order
Aug 14, 2026
Merged

zanieb merged 2 commits into
mainfrom
zb/reproduce-python-variant-order

Conversation

@astral-automations-bot

@astral-automations-bot astral-automations-bot Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Captures the behavior described in the Discord report where requires-python = "==3.15.*" selects a free-threaded interpreter when both variants are installed. The test contrasts deterministic managed-install discovery with selection through the installed executable aliases, which currently follows filesystem enumeration order.

@astral-automations-bot astral-automations-bot Bot added internal A refactor or improvement that is not user-facing test:macos Enable macOS tests for a pull request internal:testing Internal testing of behavior labels Aug 14, 2026
@astral-automations-bot astral-automations-bot Bot added internal:testing Internal testing of behavior test:macos Enable macOS tests for a pull request labels Aug 14, 2026
@zanieb
zanieb enabled auto-merge (squash) August 14, 2026 03:26
@zanieb
zanieb merged commit 0f98c5d into main Aug 14, 2026
109 of 111 checks passed
@zanieb
zanieb deleted the zb/reproduce-python-variant-order branch August 14, 2026 03:57
EliteTK added a commit that referenced this pull request Aug 14, 2026
Python version ranges can encounter several version-specific executables
in the same `PATH` directory, but filesystem enumeration does not
establish which interpreters they actually launch. Preserve
equal-priority fallback candidates through source filtering, query them
in the existing installation pipeline, and reuse `PythonInstallationKey`
ordering to prefer newer versions and default variants while preserving
executable-name precedence, directory order, and lazy discovery.

Follows #21124

---------

Co-authored-by: Zanie Blue <[email protected]>
Co-authored-by: Tomasz (Tom) Kramkowski <[email protected]>
VedantMadane added a commit to VedantMadane/uv that referenced this pull request Sep 21, 2026
astral-sh#21124)

Captures the behavior described in the Discord report where
`requires-python = "==3.15.*"` selects a free-threaded interpreter when
both variants are installed. The test contrasts deterministic
managed-install discovery with selection through the installed
executable aliases, which currently follows filesystem enumeration
order.

---------

Co-authored-by: Zanie Blue <[email protected]>
VedantMadane added a commit to VedantMadane/uv that referenced this pull request Sep 21, 2026
Python version ranges can encounter several version-specific executables
in the same `PATH` directory, but filesystem enumeration does not
establish which interpreters they actually launch. Preserve
equal-priority fallback candidates through source filtering, query them
in the existing installation pipeline, and reuse `PythonInstallationKey`
ordering to prefer newer versions and default variants while preserving
executable-name precedence, directory order, and lazy discovery.

Follows astral-sh#21124

---------

Co-authored-by: Zanie Blue <[email protected]>
Co-authored-by: Tomasz (Tom) Kramkowski <[email protected]>

This branch was previously deployed

1 inactive deployment
automations — 2a83b73e Deployed Aug 14, 2026 by astral-automations-bot[bot] via review / security review #44691
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal:testing Internal testing of behavior internal A refactor or improvement that is not user-facing test:macos Enable macOS tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant