Remove PubGrub dependency from uv (#4116)

## Summary

Encapsulates more of the details are `Requires-Python` and PubGrub.

Closes https://github.com/astral-sh/uv/issues/4110.
This commit is contained in:
Charlie Marsh 2024-06-06 19:45:58 -04:00 committed by GitHub
parent 52bdee2e85
commit cc7c780523
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 209 additions and 135 deletions

View file

@ -730,7 +730,7 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
// The version is incompatible due to its Python requirement.
if let Some(requires_python) = metadata.requires_python.as_ref() {
if let Some(target) = self.python_requirement.target() {
if !target.contains(requires_python) {
if !target.is_compatible_with(requires_python) {
return Ok(Some(ResolverVersion::Unavailable(
version.clone(),
UnavailableVersion::IncompatibleDist(IncompatibleDist::Source(