Skip to content

Commit

Permalink
Ignore pre-release segments when discovering via requires-python (#…
Browse files Browse the repository at this point in the history
…6813)

## Summary

`3.13.0b0` should be allowed by `>=3.13`.

Closes #6798.
  • Loading branch information
charliermarsh committed Aug 29, 2024
1 parent e3d5d3d commit f046e54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/uv-python/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit f046e54

Please sign in to comment.