From 748ed66a4daa62bab14e06c2150b3e95c3a53df8 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Sat, 27 Apr 2024 23:44:26 +0300 Subject: [PATCH] Fix documentation on --index-strategy values (#3290) ## Summary Dropped the `--` prefix from the values of the `--index-strategy` option mistakenly added to documentation in #3138. ## Test Plan Verified that actually accepted values of `--index-strategy` don't use a `--` prefix. --- PIP_COMPATIBILITY.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PIP_COMPATIBILITY.md b/PIP_COMPATIBILITY.md index 1f3a536de..91d65d124 100644 --- a/PIP_COMPATIBILITY.md +++ b/PIP_COMPATIBILITY.md @@ -132,15 +132,15 @@ As of v0.1.39, users can opt in to `pip`-style behavior for multiple indexes via `--index-strategy` command-line option, or the `UV_INDEX_STRATEGY` environment variable, which supports the following values: -- `--first-match` (default): Search for each package across all indexes, limiting the candidate +- `first-match` (default): Search for each package across all indexes, limiting the candidate versions to those present in the first index that contains the package, prioritizing the `--extra-index-url` indexes over the default index URL. -- `--unsafe-first-match`: Search for each package across all indexes, but prefer the first index +- `unsafe-first-match`: Search for each package across all indexes, but prefer the first index with a compatible version, even if newer versions are available on other indexes. -- `--unsafe-best-match`: Search for each package across all indexes, and select the best version +- `unsafe-best-match`: Search for each package across all indexes, and select the best version from the combined set of candidate versions. -While `--unsafe-best-match` is the closest to `pip`'s behavior, it exposes users to the risk of +While `unsafe-best-match` is the closest to `pip`'s behavior, it exposes users to the risk of "dependency confusion" attacks. In the future, uv will support pinning packages to dedicated indexes (see: [#171](https://github.com/astral-sh/uv/issues/171)).