mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Use requires-python
semantics for --universal
(#4701)
## Summary This doesn't actually change any behaviors, but it does make it a bit easier to solve #4669, because we don't have to support "version narrowing" for the non-`RequiresPython` variants in here. Right now, the semantics are kind of muddied, because the `target` variant is _sometimes_ interpreted as an exact version and sometimes as a lower bound.
This commit is contained in:
parent
348efa26ba
commit
f3d1e52e65
5 changed files with 27 additions and 38 deletions
|
@ -191,11 +191,6 @@ impl<Provider: ResolverProvider, InstalledPackages: InstalledPackagesProvider>
|
|||
provider: Provider,
|
||||
installed_packages: InstalledPackages,
|
||||
) -> Result<Self, ResolveError> {
|
||||
let requires_python = if markers.is_some() {
|
||||
None
|
||||
} else {
|
||||
Some(python_requirement.to_marker_tree())
|
||||
};
|
||||
let state = ResolverState {
|
||||
index: index.clone(),
|
||||
git: git.clone(),
|
||||
|
@ -214,8 +209,12 @@ impl<Provider: ResolverProvider, InstalledPackages: InstalledPackagesProvider>
|
|||
exclusions: manifest.exclusions,
|
||||
hasher: hasher.clone(),
|
||||
markers: markers.cloned(),
|
||||
requires_python: if markers.is_some() {
|
||||
None
|
||||
} else {
|
||||
python_requirement.to_marker_tree()
|
||||
},
|
||||
python_requirement: python_requirement.clone(),
|
||||
requires_python,
|
||||
reporter: None,
|
||||
installed_packages,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue