Respect fork markers in --resolution-mode=lowest-direct (#8839)

## Summary

Previously, given:

```toml
dependencies = [
    "pycountry >= 22.1.10",
    "setuptools >= 50.0.0; python_version>='3.12'"
]
```

We'd solve for the lowest version of setuptools (with _no_ lower-bound
constraint) in the `python_version < '3.12'` complement.

Closes https://github.com/astral-sh/uv/issues/8819.
This commit is contained in:
Charlie Marsh
2024-11-05 16:09:38 -05:00
committed by GitHub
parent d238642d76
commit 26e3511ebd
5 changed files with 119 additions and 26 deletions
@@ -122,7 +122,7 @@ impl BatchPrefetcher {
}
}
BatchPrefetchStrategy::InOrder { previous } => {
let mut range = if selector.use_highest_version(name) {
let mut range = if selector.use_highest_version(name, env) {
Range::strictly_lower_than(previous)
} else {
Range::strictly_higher_than(previous)