uv/scripts/scenarios
Andrew Gallant c46fa74e65
make universal resolver fork only when markers are disjoint (#4135)
The basic idea here is to make it so forking can only ever result in a
resolution that, for a particular marker environment, will only install
at most one version of a package. We can guarantee this by ensuring we
only fork on conflicting dependency specifications only when their
corresponding markers are completely disjoint. If they aren't, then
resolution _must_ find a single version of the package in the
intersection of the two dependency specifications.

A test for this case has been added to packse here:
https://github.com/astral-sh/packse/pull/182. Previously, that test
would result in a resolution with two different unconditional versions
of the same package. With this change, resolution fails (as it should).

A commit-by-commit review should be helpful here, since the first commit
is a refactor to make the second commit a bit more digestible.
2024-06-07 23:40:55 +00:00
..
templates scripts/scenarios: update 'generate.py' to handle universal tests 2024-06-04 14:24:59 -04:00
generate.py scripts/scenarios: update 'generate.py' to handle universal tests 2024-06-04 14:24:59 -04:00
requirements.in make universal resolver fork only when markers are disjoint (#4135) 2024-06-07 23:40:55 +00:00
requirements.txt make universal resolver fork only when markers are disjoint (#4135) 2024-06-07 23:40:55 +00:00