Add a universal resolution mode to pip compile (#4505)

## Summary

This needs more tests and a few more changes, but checkpointing it for
now.
This commit is contained in:
Charlie Marsh 2024-06-25 17:28:50 -04:00 committed by GitHub
parent f2f48d339e
commit e1708689a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 186 additions and 27 deletions

View file

@ -48,7 +48,6 @@ use crate::pubgrub::{
PubGrubPriorities, PubGrubPython, PubGrubSpecifier,
};
use crate::python_requirement::PythonRequirement;
use crate::requires_python::RequiresPython;
use crate::resolution::ResolutionGraph;
pub(crate) use crate::resolver::availability::{
IncompletePackage, ResolverVersion, UnavailablePackage, UnavailableReason, UnavailableVersion,
@ -193,12 +192,7 @@ impl<Provider: ResolverProvider, InstalledPackages: InstalledPackagesProvider>
let requires_python = if markers.is_some() {
None
} else {
Some(
python_requirement
.requires_python()
.map(RequiresPython::to_marker_tree)
.unwrap_or_else(|| MarkerTree::And(vec![])),
)
Some(python_requirement.to_marker_tree())
};
let state = ResolverState {
index: index.clone(),