From f046e54c645c68001a1d5e138b671881f1423a7f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 29 Aug 2024 12:45:29 -0400 Subject: [PATCH] Ignore pre-release segments when discovering via `requires-python` (#6813) ## Summary `3.13.0b0` should be allowed by `>=3.13`. Closes #6798. --- 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 f0b4876ac..9158d9837 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -1441,7 +1441,10 @@ impl VersionRequest { interpreter.python_patch(), ) == (*major, *minor, *patch) } - Self::Range(specifiers) => specifiers.contains(interpreter.python_version()), + Self::Range(specifiers) => { + let version = interpreter.python_version().only_release(); + specifiers.contains(&version) + } } }