uv/crates/uv-resolver/src
Charlie Marsh fe0b873352
Always narrow markers by Python version (#6076)
## Summary

Using https://github.com/astral-sh/uv/issues/6064 as a motivating
example: at present, on main, we're not properly propagating the
`Requires-Python` simplifications. In that case, for example, we end up
solving for a branch with `python_version < 3.11`, and a branch `>=
3.11`, even though `Requires-Python` is `>=3.11`. Later, when we get to
the graph, we apply version simplification based on `Requires-Python`,
which causes us to _remove_ the `python_version < 3.11` markers
entirely, leaving us with duplicate dependencies for `pylint`.

This PR instead tries to ensure that we always apply this narrowing to
requirements and forks, so that we don't need to apply the same
simplification when constructing the graph at all.

Closes https://github.com/astral-sh/uv/issues/6064.

Closes #6059.
2024-08-15 11:50:00 -04:00
..
pubgrub Use "your requirements" consistently in resolver error messages (#6113) 2024-08-15 10:26:30 -05:00
resolution Always narrow markers by Python version (#6076) 2024-08-15 11:50:00 -04:00
resolver Always narrow markers by Python version (#6076) 2024-08-15 11:50:00 -04:00
snapshots Use sets rather than vectors for lockfile requirements (#6107) 2024-08-15 13:00:35 +00:00
bare.rs Add support for parsing unnamed URL requirements (#2567) 2024-03-21 03:28:58 +00:00
candidate_selector.rs Respect pre-release preferences from input files (#5736) 2024-08-02 22:01:58 -04:00
dependency_mode.rs Store resolution options in lockfile (#5264) 2024-07-22 08:28:22 -04:00
dependency_provider.rs Update pubgrub (#5649) 2024-07-31 12:54:11 +00:00
error.rs Improve resolver error messages for single-project workspaces (#6095) 2024-08-15 03:08:56 +00:00
exclude_newer.rs Store resolution options in lockfile (#5264) 2024-07-22 08:28:22 -04:00
exclusions.rs Allow constraints to be provided in `--upgrade-package` (#4952) 2024-07-09 20:09:13 -07:00
flat_index.rs Enforce extension validity at parse time (#5888) 2024-08-08 21:39:47 -04:00
fork_urls.rs Add forks to lockfile, don't read them yet (#5480) 2024-07-30 11:11:18 +00:00
lib.rs Validate lockfile (rather than re-resolve) in `uv lock` (#6091) 2024-08-14 20:00:15 -04:00
lock.rs Always narrow markers by Python version (#6076) 2024-08-15 11:50:00 -04:00
manifest.rs Improve resolver error messages referencing workspace members (#6092) 2024-08-15 02:41:31 +00:00
marker.rs Implement marker trees using algebraic decision diagrams (#5898) 2024-08-09 13:40:02 -04:00
options.rs Use "pre-release" in prose and `Prerelease` in code (#5697) 2024-08-01 20:56:29 +00:00
pins.rs Unify resolutions only during graph building (#5479) 2024-07-26 16:29:48 +02:00
preferences.rs Store `environment-markers` in solve order (#6078) 2024-08-14 09:20:12 -04:00
prerelease.rs Retain and respect settings in tool upgrades (#5937) 2024-08-09 18:21:49 +00:00
python_requirement.rs Always narrow markers by Python version (#6076) 2024-08-15 11:50:00 -04:00
redirect.rs Preserve fragments when applying verbatim redirects (#4038) 2024-06-05 03:53:23 +00:00
requires_python.rs Always narrow markers by Python version (#6076) 2024-08-15 11:50:00 -04:00
resolution_mode.rs Omit transitive development dependencies from workspace lockfile (#5646) 2024-07-30 22:32:33 -04:00
version_map.rs Enforce extension validity at parse time (#5888) 2024-08-08 21:39:47 -04:00
yanks.rs Use fork markers and fork preferences in resolution with lockfile (#5481) 2024-07-31 15:18:58 +00:00