mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Make < exclusive for non-prerelease markers (#1878)
## Summary Even when pre-releases are "allowed", per PEP 440, `pydantic<2.0.0` should _not_ include pre-releases. This PR modifies the specifier translation to treat `pydantic<2.0.0` as `pydantic<2.0.0.min0`, where `min` is an internal-only version segment that's invisible to users. Closes https://github.com/astral-sh/uv/issues/1641.
This commit is contained in:
parent
53a250714c
commit
8d706b0f2a
10 changed files with 440 additions and 58 deletions
|
@ -521,7 +521,7 @@ impl CacheBucket {
|
|||
CacheBucket::FlatIndex => "flat-index-v0",
|
||||
CacheBucket::Git => "git-v0",
|
||||
CacheBucket::Interpreter => "interpreter-v0",
|
||||
CacheBucket::Simple => "simple-v2",
|
||||
CacheBucket::Simple => "simple-v3",
|
||||
CacheBucket::Wheels => "wheels-v0",
|
||||
CacheBucket::Archive => "archive-v0",
|
||||
}
|
||||
|
@ -677,13 +677,13 @@ impl ArchiveTimestamp {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::cmp::PartialOrd for ArchiveTimestamp {
|
||||
impl PartialOrd for ArchiveTimestamp {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
Some(self.timestamp().cmp(&other.timestamp()))
|
||||
}
|
||||
}
|
||||
|
||||
impl std::cmp::Ord for ArchiveTimestamp {
|
||||
impl Ord for ArchiveTimestamp {
|
||||
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||
self.timestamp().cmp(&other.timestamp())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue