-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Not sure if this is a documentation issue or a bug.
The documentation shows both first-match and first-index as possible options for index-strategy:
- https://docs.astral.sh/uv/reference/settings/#index-strategy (in the paragraph, the option is written as
first-match, but the possible values below that only containfirst-index) - https://docs.astral.sh/uv/configuration/indexes/#searching-across-multiple-indexes (only mentions
first-match)
--help also only shows first-index as a possible value:
$ uv add --help #also for uv pip install --help
...
Index options:
...
--no-index
Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and
those provided via `--find-links`
--index-strategy <INDEX_STRATEGY>
The strategy to use when resolving against multiple index URLs [env: UV_INDEX_STRATEGY=]
[possible values: first-index, unsafe-first-match, unsafe-best-match]
--keyring-provider <KEYRING_PROVIDER>
Attempt to use `keyring` for authentication for index URLs [env: UV_KEYRING_PROVIDER=]
[possible values: disabled, subprocess]I tried to set the index strategy using (uv 0.5.10):
--index-strategyUV_INDEX_STRATEGYpyproject.toml
Both first-index and first-match work when set using --index-strategy or UV_INDEX_STRATEGY, but only first-index works in pyproject.toml, not sure if this is intended:
warning: Failed to parse `pyproject.toml` during settings discovery:
TOML parse error at line 10, column 18
|
10 | index-strategy = "first-match"
| ^^^^^^^^^^^^^
unknown variant `first-match`, expected one of `first-index`, `unsafe-any-match`, `unsafe-first-match`, `unsafe-best-match`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation