Merge uv-pubgrub into uv-pep440 (#8669)

This commit is contained in:
konsti 2024-10-29 20:15:18 +01:00 committed by GitHub
parent f903cd2cce
commit e5b8cdba70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 96 additions and 106 deletions

View file

@ -9,9 +9,8 @@ use std::str::FromStr;
use tracing::debug;
use uv_fs::Simplified;
use uv_normalize::{ExtraName, PackageName};
use uv_pep440::{Version, VersionSpecifiers};
use uv_pep440::{Version, VersionRangesSpecifier, VersionSpecifiers};
use uv_pep508::{Requirement, VersionOrUrl};
use uv_pubgrub::PubGrubSpecifier;
use uv_pypi_types::{Metadata23, VerbatimParsedUrl};
use uv_warnings::warn_user_once;
@ -135,7 +134,7 @@ impl PyProjectToml {
);
passed = false;
}
PubGrubSpecifier::from_pep440_specifiers(specifier)
VersionRangesSpecifier::from_pep440_specifiers(specifier)
.ok()
.and_then(|specifier| Some(specifier.bounding_range()?.1 != Bound::Unbounded))
.unwrap_or(false)