From 6250b900b7bd6f8461e1d2604856457e056d176a Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 4 Nov 2024 07:45:24 -0600 Subject: [PATCH] Allow managed downloads with `--python-preference system` (#8808) Closes https://github.com/astral-sh/uv/issues/8804 --- crates/uv-python/src/discovery.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index 4993f7868f47..de4016aaf2bf 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -1546,7 +1546,10 @@ impl PythonPreference { } pub(crate) fn allows_managed(self) -> bool { - matches!(self, Self::Managed | Self::OnlyManaged) + match self { + Self::OnlySystem => false, + Self::Managed | Self::System | Self::OnlyManaged => true, + } } }