Skip to content

Named indices in python-repos.indexes are not explicit-only when using uv resolver #23625

Description

@tmarback

Describe the bug

With pex, any named indices (i.e. where the string starts with some-name=) are only used for dependencies that directly target that index (using resolves_to_sources).
However, the uv resolver does not set explicit = true on generated named indices, so they will also be searched for dependecies without an explicit source.
While this can be mostly worked around with index ordering (since uv stops at the first index where a match is found), there is no documentation indicating these changes may be needed when switching to the uv resolver, and generally not having a way to set explict-only indices opens the risk of dependencies being taken from unintended sources in cases where it would be better to throw an error.

Pants version
2.33.0

OS
Both

Additional info
N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions