Skip to content

uv doesn't complain if two indexes defined in pyproject.toml have the same name #11804

@jtfmumm

Description

@jtfmumm

Summary

If I create a new project with uv init and add two index specifications with the same name to pyproject.toml, I can run uv add without encountering an error.

[[tool.uv.index]]
name = "alpha_b"
url = "<omitted>"

[[tool.uv.index]]
name = "alpha_b"
url = "<omitted>"

I would expect that this would result in at least a warning. For example, it could lead to surprising behavior when interacting with the in-progress [index proxy url work][https://github.com//pull/11782].

Platform

macOS 13.5

Version

0.5.21

Python version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesMessaging when something goes wronggood first issueGood for newcomershelp wantedContribution especially encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions