Skip to content

Commit

Permalink
Clarify package priority order in pip compatibility guide
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Aug 25, 2024
1 parent 069b021 commit 469209e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/pip/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,11 @@ consistent with

## Package priority

There are usually many possible solutions given a set of requirements — a resolver must choose
between the solutions. Unlike pip, uv's resolver uses the ordering provided of packages to determine
the default priority. This means that uv's resolution can differ based on the order of the packages.
For example, `uv pip install foo bar` would prioritize a newer version of `foo` over `bar`.
Similarly, this applies to the ordering of requirements in input files to `uv pip compile`.
There are usually many possible solutions given a set of requirements, and a resolver must choose
between them. uv's resolver has different heuristics compared to pip's resolver; uv is more likely
to use the provided order of packages to determine the default priority. This means that uv's
resolution is more likely to differ based on the order of the packages compared to pip's resolution.

For example, `uv pip install foo bar` prioritizes newer versions of `foo` over `bar` and could
result in a different resolution than `uv pip install bar foo`. Similarly, this behavior applies
to the ordering of requirements in input files for `uv pip compile`.

0 comments on commit 469209e

Please sign in to comment.