Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion crates/uv-trampoline/src/bounce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,18 @@ fn make_child_cmdline() -> CString {
// whether `PYTHONHOME` was set by uv. This allows us to:
// - Override inherited `PYTHONHOME` from parent Python processes
// - Preserve user-defined `PYTHONHOME` values
if !is_virtualenv(python_exe.as_path()) {
//
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test-windows-trampolines / check on * CI jobs are failing. Per the workflow, these run cargo fmt --check and cargo clippy --all-features --target x86_64-pc-windows-msvc --tests -- -D warnings.

Please run:

cd crates/uv-trampoline
cargo fmt
cargo clippy --all-features --target x86_64-pc-windows-msvc --tests -- -D warnings

Then push the formatting fixes.

// We must check both `executable_name` (the trampoline itself,
// which may live inside a virtual environment's `Scripts`
// directory and target the base interpreter via the
// `python_path` resource) and `python_exe` (the resolved target
// interpreter). Otherwise, virtual environments built on top of
// managed interpreters would incorrectly receive `PYTHONHOME`
// pointing at the base installation, which then leaks into
// child processes and can shadow stdlib from a different Python
// (see https://github.com/astral-sh/uv/issues/19080).
if !is_virtualenv(executable_name.as_path()) && !is_virtualenv(python_exe.as_path())
{
let python_home = std::env::var(EnvVars::PYTHONHOME).ok();
let marker = std::env::var(EnvVars::UV_INTERNAL__PYTHONHOME).ok();

Expand Down
Loading