diff --git a/docs/pip/compatibility.md b/docs/pip/compatibility.md index 5719c2fcc..2ce702006 100644 --- a/docs/pip/compatibility.md +++ b/docs/pip/compatibility.md @@ -447,7 +447,7 @@ By default, uv does not write any index URLs to the output file, while `pip-comp in the output file, pass the `--emit-index-url` flag to `uv pip compile`. Unlike `pip-compile`, uv will include all index URLs when `--emit-index-url` is passed, including the default index URL. -## `requires-python` enforcement +## `requires-python` upper bounds When evaluating `requires-python` ranges for dependencies, uv only considers lower bounds and ignores upper bounds entirely. For example, `>=3.8, <4` is treated as `>=3.8`. Respecting upper @@ -455,6 +455,8 @@ bounds on `requires-python` often leads to formally correct but practically inco as, e.g., resolvers will backtrack to the first published version that omits the upper bound (see: [`Requires-Python` upper limits](https://discuss.python.org/t/requires-python-upper-limits/12663)). +## `requires-python` specifiers + When evaluating Python versions against `requires-python` specifiers, uv truncates the candidate version to the major, minor, and patch components, ignoring (e.g.) pre-release and post-release identifiers.