Skip to content

Require tests to opt-in to managed Python installation#10912

Merged
zanieb merged 4 commits intomainfrom
zb/install-test
Jan 23, 2025
Merged

Require tests to opt-in to managed Python installation#10912
zanieb merged 4 commits intomainfrom
zb/install-test

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jan 23, 2025

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.

@zanieb zanieb added the testing Internal testing of behavior label Jan 23, 2025
Comment on lines +7665 to +7652
version = "12.6.85"
version = "12.8.61"
Copy link
Member Author

@zanieb zanieb Jan 23, 2025

Choose a reason for hiding this comment

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

Confused this changed 🤔

Otherwise, some `build` tests try to pull 3.13 by discovering the pin in our workspace root
@@ -0,0 +1 @@
3.12
Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is such a mood 😭

Comment on lines +540 to +541
// Installations are not allowed by default; see `Self::with_managed_python_dirs`
.env(EnvVars::UV_PYTHON_DOWNLOADS, "never")
Copy link
Member Author

Choose a reason for hiding this comment

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

This bans Python downloads in most tests.

@zanieb zanieb merged commit fd5131c into main Jan 23, 2025
71 checks passed
@zanieb zanieb deleted the zb/install-test branch January 23, 2025 21:24
Copy link
Contributor

@Gankra Gankra left a comment

Choose a reason for hiding this comment

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

Seems reasonable/better.

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

Labels

testing Internal testing of behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants