Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect .python-version in uv venv --preview #4360

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jun 17, 2024

Adds support for reading Python version files (introduced in #4335) to uv venv. If present, we'll use the file version as the default.

@zanieb zanieb added the preview Experimental behavior label Jun 17, 2024
3.8.18
3.9.18
3.10.13
3.11.7
3.12.1
Copy link
Member Author

@zanieb zanieb Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reversed the ordering here because we want this to be the "first" version we use.

@zanieb zanieb force-pushed the zb/toolchain-version-files branch from bea2f20 to 9f711ec Compare June 17, 2024 18:42
Base automatically changed from zb/toolchain-version-files to main June 17, 2024 18:54
zanieb added a commit that referenced this pull request Jun 17, 2024
…sions (#4368)

Extends new filters for interpreter paths to apply to tests with
multiple Python versions. Adds patch version filtering for them as well,
which is needed for #4360 tests.
@zanieb zanieb force-pushed the zb/toolchain-file-venv branch 2 times, most recently from 9d72e8e to 80d58f3 Compare June 17, 2024 21:17
@zanieb zanieb changed the base branch from main to zb/test-context June 17, 2024 21:18
@zanieb zanieb force-pushed the zb/test-context branch 11 times, most recently from b2a114d to 43bd971 Compare June 18, 2024 03:06
@zanieb zanieb force-pushed the zb/test-context branch 3 times, most recently from e6f41ad to 10b13f0 Compare June 18, 2024 03:18
Base automatically changed from zb/test-context to main June 18, 2024 14:11
zanieb added a commit that referenced this pull request Jun 18, 2024
It was becoming problematic that the virtual environment test context
diverged from the other one i.e. we had to implement filtering twice.
This combines the contexts and tweaks the `TestContext` API and
filtering mechanisms for Python versions. Combined with my previous
changes to the test context at #4364 and
#4368 this finally unblocks the
snapshots for test cases in #4360 and
#4362.
@zanieb zanieb enabled auto-merge (squash) June 18, 2024 14:12
@zanieb zanieb merged commit 903dfc2 into main Jun 18, 2024
47 checks passed
@zanieb zanieb deleted the zb/toolchain-file-venv branch June 18, 2024 14:21
zanieb added a commit that referenced this pull request Jun 18, 2024
…ject commands (#4361)

As in #4360, updates the uv project CLI to respect `.python-version`
files as default Python version requests. Additionally, updates project
interpreter discovery to fetch managed toolchains as in `uv venv
--preview`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants