Skip to content

Commit 533c7e3

Browse files
authored
Drop Python version range enforcement from PythonVersion::from_str (#7264)
This caused some problems earlier, as it prevented us from _listing_ Python versions <3.7 which seems weird (see #7131 (comment)) I'm worried that without this the changes to installation key parsing in #7263 would otherwise be too restrictive. I think if we want to enforce these ranges, we should do so separately from the parse step.
1 parent 4f03d20 commit 533c7e3

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

crates/uv-python/src/python_version.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ impl FromStr for PythonVersion {
3131
if version.epoch() != 0 {
3232
return Err(format!("Python version `{s}` has a non-zero epoch"));
3333
}
34-
if version.version < Version::new([3, 7]) {
35-
return Err(format!("Python version `{s}` must be >= 3.7"));
36-
}
37-
if version.version >= Version::new([4, 0]) {
38-
return Err(format!("Python version `{s}` must be < 4.0"));
39-
}
4034

4135
Ok(Self(version))
4236
}

0 commit comments

Comments
 (0)