From 7e39a80b187db50f8598b5be262d1eeb0bb64c51 Mon Sep 17 00:00:00 2001 From: Michael Gathara Date: Tue, 27 May 2025 09:35:48 -0500 Subject: [PATCH] Include pre-release versions in `uv python install --reinstall` (#13645) ## Summary This change allows for `uv python install --reinstall` to include pre-releases when reinstalling. It does this by explicitly allowing pre-releases to be included within `PythonRequest::Any` if the user does not specify a version to reinstall. Fixes #13582 ## Test Plan ```bash uv python install 3.14 3.13 3.10 uv python install --no-config --reinstall ``` --- crates/uv-python/src/downloads.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index 4989208be..eae8fa545 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -204,7 +204,11 @@ impl PythonDownloadRequest { .with_version(version.clone()), ), PythonRequest::Key(request) => Some(request.clone()), - PythonRequest::Default | PythonRequest::Any => Some(Self::default()), + PythonRequest::Any => Some(Self { + prereleases: Some(true), // Explicitly allow pre-releases for PythonRequest::Any + ..Self::default() + }), + PythonRequest::Default => Some(Self::default()), // We can't download a managed installation for these request kinds PythonRequest::Directory(_) | PythonRequest::ExecutableName(_)