uv/crates/uv-resolver/src
Charlie Marsh 3799862f5d
Trim injected `python_version` marker to (major, minor) (#2395)
## Summary

Per [PEP 508](https://peps.python.org/pep-0508/), `python_version` is
just major and minor:

![Screenshot 2024-03-12 at 5 15
09 PM](https://github.com/astral-sh/uv/assets/1309177/cc3b8d65-dab3-4229-aed7-c6fe590b8da0)

Right now, we're using the provided version directly, so if it's, e.g.,
`-p 3.11.8`, we'll inject the wrong marker. This was causing `pandas` to
omit `numpy` when `-p 3.11.8` was provided, since its markers look like:

```
Requires-Dist: numpy<2,>=1.22.4; python_version < "3.11"
Requires-Dist: numpy<2,>=1.23.2; python_version == "3.11"
Requires-Dist: numpy<2,>=1.26.0; python_version >= "3.12"
```

Closes https://github.com/astral-sh/uv/issues/2392.
2024-03-13 00:11:50 +00:00
..
pubgrub Remove `Range::bounds` usage (#2363) 2024-03-11 21:10:16 +00:00
resolver Trim injected `python_version` marker to (major, minor) (#2395) 2024-03-13 00:11:50 +00:00
candidate_selector.rs Refactor incompatiblity tracking for distributions (#1298) 2024-03-08 11:02:31 -06:00
constraints.rs Move conflicting dependencies into PubGrub (#1796) 2024-02-21 21:27:58 -05:00
dependency_mode.rs Rename to `uv` (#1302) 2024-02-15 11:19:46 -06:00
editables.rs Add support for Metadata 2.2 (#2293) 2024-03-08 16:02:32 +00:00
error.rs Trim injected `python_version` marker to (major, minor) (#2395) 2024-03-13 00:11:50 +00:00
finder.rs Refactor incompatiblity tracking for distributions (#1298) 2024-03-08 11:02:31 -06:00
lib.rs Preserve environment variables in resolved Git dependencies (#2125) 2024-03-01 20:38:34 -05:00
manifest.rs Add support for Metadata 2.2 (#2293) 2024-03-08 16:02:32 +00:00
options.rs Rename to `uv` (#1302) 2024-02-15 11:19:46 -06:00
overrides.rs Move conflicting dependencies into PubGrub (#1796) 2024-02-21 21:27:58 -05:00
pins.rs Refactor incompatiblity tracking for distributions (#1298) 2024-03-08 11:02:31 -06:00
prerelease_mode.rs Make direct dependency detection respect markers (#2207) 2024-03-05 17:25:06 +00:00
python_requirement.rs Trim injected `python_version` marker to (major, minor) (#2395) 2024-03-13 00:11:50 +00:00
redirect.rs Expand environment variables prior to detecting scheme (#2394) 2024-03-12 19:17:41 -04:00
resolution.rs Ignore inverse dependencies when building graph (#2360) 2024-03-11 13:51:42 -04:00
resolution_mode.rs Make direct dependency detection respect markers (#2207) 2024-03-05 17:25:06 +00:00
version_map.rs Refactor incompatiblity tracking for distributions (#1298) 2024-03-08 11:02:31 -06:00
yanks.rs Refactor incompatiblity tracking for distributions (#1298) 2024-03-08 11:02:31 -06:00