Note uv pip list name normalization in docs (#13210)

Related to https://github.com/astral-sh/uv/issues/13209

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
Gabe Joseph 2025-11-02 12:39:30 -08:00 committed by GitHub
parent 4b61e65d6c
commit 17c9656df2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -489,3 +489,25 @@ the file. For example, a wheel named `foo-1.0.0-py3-none-any.whl` that contains
the version is `1.0.1` will be rejected by uv, but accepted by pip.
To force uv to accept such wheels, set `UV_SKIP_WHEEL_FILENAME_CHECK=1` in the environment.
## Package name normalization
By default, uv normalizes package names to match their
[PEP 503-compliant forms](https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization)
and uses those normalized names in all output contexts. This differs from pip, which tends to
preserve the verbatim package name as published on the registry.
For example, `uv pip list` displays normalized packages names (e.g., `docstring-parser`), while
`pip list` displays non-normalized package names (e.g., `docstring_parser`):
```shell
(venv) $ diff --side-by-side <(pip list) <(uv pip list)
Package Version Package Version
---------------- ------- ---------------- -------
docstring_parser 0.16 | docstring-parser 0.16
jaraco.classes 3.4.0 | jaraco-classes 3.4.0
more-itertools 10.7.0 more-itertools 10.7.0
pip 25.1 pip 25.1
PyMuPDFb 1.24.10 | pymupdfb 1.24.10
PyPDF2 3.0.1 | pypdf2 3.0.1
```