From e6cd6c9b01407232456f71ee74b35c7dbabaa234 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 24 Sep 2024 13:00:28 -0500 Subject: [PATCH] Use the first pre-release discovered when only pre-release Python versions are available (#7666) --- crates/uv-python/src/discovery.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index 2a4f38171..83e3e74c8 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -950,7 +950,9 @@ pub(crate) fn find_python_installation( && !has_default_executable_name { debug!("Skipping pre-release {}", installation.key()); - first_prerelease = Some(installation.clone()); + if first_prerelease.is_none() { + first_prerelease = Some(installation.clone()); + } continue; }