Skip to content

fix(discovery): reuse preferred paths across interpreter specifications - #180

Open
subotac wants to merge 1 commit into
tox-dev:mainfrom
subotac:fix/reuse-preferred-interpreter-paths
Open

subotac wants to merge 1 commit into
tox-dev:mainfrom
subotac:fix/reuse-preferred-interpreter-paths

Conversation

@subotac

@subotac subotac commented Nov 1, 2026

Copy link
Copy Markdown

An iterator passed as try_first_with is exhausted by the first unsuccessful interpreter specification. A later specification can then miss the preferred interpreter even when it matches.

Materialize the preferred paths once before trying the specifications, matching the handling already used by iter_interpreters. The regression creates a real virtual environment and checks that a list and an iterator produce the same fallback result.

Validation: 662 Linux tests passed, 17 skipped, with 100% coverage; ty checks for Python 3.9 and 3.15 targets and all prek checks passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant