mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 13:43:45 +00:00
![]() ## Summary This PR addresses a significant limitation in the resolver whereby we avoid choosing the latest versions of packages when the user supports a wider range. For example, with NumPy, the latest versions only support Python 3.10 and later. If you lock a project with `requires-python = ">=3.8"`, we pick the last NumPy version that supported Python 3.8, and use that for _all_ Python versions. So you get `1.24.4` for all versions, rather than `2.2.0`. And we'll never upgrade you unless you bump your `requires-python`. (Even worse, those versions don't have wheels for Python 3.12, etc., so you end up building from source.) (As-is, this is intentional. We optimize for minimizing the number of selected versions, and the current logic does that well!) Instead, we know recognize when a version has an elevated `requires-python` specifier and fork. This is a new fork point, since we need to fork once we have the package metadata, as opposed to when we see the dependencies. In this iteration, I've made this behavior the default. I'm sort of undecided on whether I want to push on that... Previously, I'd suggested making it opt-in via a setting (https://github.com/astral-sh/uv/pull/8686). Closes https://github.com/astral-sh/uv/issues/8492. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |