Require tests to opt-in to managed Python installation#10912
Merged
Conversation
zanieb
commented
Jan 23, 2025
crates/uv/tests/it/lock_conflict.rs
Outdated
Comment on lines
+7665
to
+7652
| version = "12.6.85" | ||
| version = "12.8.61" |
Member
Author
There was a problem hiding this comment.
Confused this changed 🤔
f463c92 to
c1777ea
Compare
Otherwise, some `build` tests try to pull 3.13 by discovering the pin in our workspace root
zanieb
commented
Jan 23, 2025
| @@ -0,0 +1 @@ | |||
| 3.12 | |||
Member
Author
There was a problem hiding this comment.
Annoying, but... uv build treats this package as the start of the workspace and it picks up the .python-version pin in our repository (3.13) which cannot be satisfied during the build tests (which use 3.12).
The better solution here is to copy this project into the test context instead of using this possibly dirty directory in each test! but I don't want to deal with that here.
zanieb
commented
Jan 23, 2025
Comment on lines
+540
to
+541
| // Installations are not allowed by default; see `Self::with_managed_python_dirs` | ||
| .env(EnvVars::UV_PYTHON_DOWNLOADS, "never") |
Member
Author
There was a problem hiding this comment.
This bans Python downloads in most tests.
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.
First of all, I want to test automatic managed installs (see #10913) and need to set that up. Second of all, some tests were implicitly downloading interpreters instead of using the one from their context — which is unexpected and naughty and very slow.