Make target Python version an optional field (#4000)

## Summary

Instead of checking if the target and installed version are the same, we
model the data such that the target version is only present if it was
specified by the user. This also means that we correctly say "requested
version" even if the two happen to be the same.
This commit is contained in:
Charlie Marsh 2024-06-03 18:37:15 -04:00 committed by GitHub
parent 037e7e345c
commit 77e93157fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 61 additions and 35 deletions

View file

@ -150,9 +150,8 @@ impl<'a> BuildContext for BuildDispatch<'a> {
}
async fn resolve<'data>(&'data self, requirements: &'data [Requirement]) -> Result<Resolution> {
let python_requirement = PythonRequirement::from_interpreter(self.interpreter);
let markers = self.interpreter.markers();
let python_requirement =
PythonRequirement::from_marker_environment(self.interpreter, markers);
let tags = self.interpreter.tags()?;
let resolver = Resolver::new(
Manifest::simple(requirements.to_vec()),