Special-case == Python version request ranges (#9697)
Related to https://github.com/astral-sh/uv/issues/9695 Doesn't solve the reported issue with `requires-python` because that doesn't go through the parser https://github.com/astral-sh/uv/blob/6ed6fc108e95e742075cf1eddb09ec86c04f632e/crates/uv/src/commands/project/mod.rs#L518-L526
This commit is contained in:
@@ -3324,6 +3324,11 @@ fn parse_version_specifiers_request(
|
||||
if specifiers.is_empty() {
|
||||
return Err(Error::InvalidVersionRequest(s.to_string()));
|
||||
}
|
||||
if let [specifier] = specifiers.iter().as_slice() {
|
||||
if specifier.operator() == &uv_pep440::Operator::Equal {
|
||||
return VersionRequest::from_str(&specifier.version().to_string());
|
||||
}
|
||||
}
|
||||
Ok(VersionRequest::Range(specifiers, variant))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user