From c0ca0b02b881be7a89fba24e51292ccba0d22b91 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 5 Jul 2024 17:13:57 -0400 Subject: [PATCH] Fill Python requests with platform information during automatic fetches (#4810) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/astral-sh/uv/issues/4800 We do this during `install` — it's an important step to ensure the request has the platform information in it. --- crates/uv-python/src/installation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv-python/src/installation.rs b/crates/uv-python/src/installation.rs index 48dcd2f04..7a17ed4f0 100644 --- a/crates/uv-python/src/installation.rs +++ b/crates/uv-python/src/installation.rs @@ -88,7 +88,7 @@ impl PythonInstallation { // Perform a fetch aggressively if managed Python is preferred if matches!(preference, PythonPreference::Managed) && python_fetch.is_automatic() { if let Some(request) = PythonDownloadRequest::try_from_request(&request) { - return Self::fetch(request, client_builder, cache).await; + return Self::fetch(request.fill(), client_builder, cache).await; } } @@ -103,7 +103,7 @@ impl PythonInstallation { { if let Some(request) = PythonDownloadRequest::try_from_request(&request) { debug!("Requested Python not found, checking for available download..."); - Self::fetch(request, client_builder, cache).await + Self::fetch(request.fill(), client_builder, cache).await } else { err }