uv
3799862f - Trim injected `python_version` marker to (major, minor) (#2395)

Commit
1 year ago
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.
Author
Parents
Loading