uv/crates/uv-resolver/src
Andrew Gallant 857d2e8f1e uv-resolver: partially revert Requires-Python version narrowing
The PR #4707 introduced the notion of "version narrowing," where a
Requires-Python constraint was _possibly_ narrowed whenever the
universal resolver created a fork. The version narrowing would occur
when the fork was a result of a marker expression on `python_version`
that is *stricter* than the configured `Requires-Python` (via, say,
`pyproject.toml`).

The crucial conceptual change made by #4707 is therefore that
`Requires-Python` is no longer an invariant configuration of resolution,
but rather a mutable constraint that can vary from fork to fork. This in
turn can result in some cases, such as in #4885, where different
versions of dependencies are selected. We aren't sure whether we can fix
those or not, with version narrowing, so for now, we do this revert to
restore the previous behavior and we'll try to address the version
narrowing some other time.

This also adds the case from #4885 as a regression test, ensuring that
we don't break that in the future. I confirmed that with version
narrowing, this test outputs duplicate distributions. Without narrowing,
there are no duplicates.

Ref #4707, Fixes #4885
2024-07-08 09:56:59 -07:00
..
pubgrub Always use release-only comparisons for requires-python (#4794) 2024-07-04 20:06:52 +00:00
resolution Disable Clippy's too-many-arguments rule (#4663) 2024-06-30 19:30:38 +00:00
resolver Respect requires-python when prefetching (#4900) 2024-07-08 16:32:09 +00:00
snapshots uv-resolver: add some tests for other source types 2024-06-28 12:02:33 -07:00
bare.rs Add support for parsing unnamed URL requirements (#2567) 2024-03-21 03:28:58 +00:00
candidate_selector.rs uv-distribution: include all wheels in distribution types (#3595) 2024-05-15 15:07:28 -04:00
dependency_mode.rs Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
dependency_provider.rs Update pubgrub to new add_incompatibility_from_dependencies (#4062) 2024-06-05 20:46:00 +02:00
error.rs Support conflicting URL in separate forks (#4435) 2024-06-26 13:58:23 +02:00
exclude_newer.rs Improve JSON Schema and add export script (#3461) 2024-05-08 16:15:16 +00:00
exclusions.rs Split configuration options out of uv-types (#2924) 2024-04-09 11:35:53 -05:00
flat_index.rs Remove useless #[allow(clippy::too_many_arguments)] (#4529) 2024-06-25 19:09:59 +00:00
fork_urls.rs Support conflicting URL in separate forks (#4435) 2024-06-26 13:58:23 +02:00
lib.rs Narrow requires-python requirement in resolver forks (#4707) 2024-07-02 12:23:38 +00:00
lock.rs Sort dependencies before wheels and source distributions (#4897) 2024-07-08 14:25:05 +00:00
manifest.rs Disable Clippy's too-many-arguments rule (#4663) 2024-06-30 19:30:38 +00:00
marker.rs Always use release-only comparisons for requires-python (#4794) 2024-07-04 20:06:52 +00:00
options.rs Implement --index-strategy unsafe-best-match (#3138) 2024-04-27 01:24:54 +00:00
pins.rs uv-resolver: implement merging of forked resolutions 2024-05-30 14:23:14 -04:00
preferences.rs Set fork solution as preference when resolving (#4662) 2024-07-01 08:25:40 -04:00
prerelease_mode.rs Add support for tool.uv into distribution building (#3904) 2024-05-31 02:42:03 +00:00
python_requirement.rs uv-resolver: partially revert Requires-Python version narrowing 2024-07-08 09:56:59 -07:00
redirect.rs Preserve fragments when applying verbatim redirects (#4038) 2024-06-05 03:53:23 +00:00
requires_python.rs Always use release-only comparisons for requires-python (#4794) 2024-07-04 20:06:52 +00:00
resolution_mode.rs uv-resolver: make MarkerEnvironment optional 2024-05-09 09:24:37 -04:00
version_map.rs Move Requires-Python incompatibilities out of version map (#4705) 2024-07-02 08:15:39 -04:00
yanks.rs Use Preferences struct in Manifest API (#4496) 2024-06-24 23:28:55 +00:00