Skip to content

uv tree displaying not installed extras #19327

@tlippold-meta

Description

@tlippold-meta

Summary

When running uv tree (or uv tree --no-dedupe) the dependencies are not differentiated based on their extras.

Example

pyproject.toml

[project]
name = "test"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["asyncssh"]

[dependency-groups]
dev = ["asyncssh[bcrypt]"]

Output:

test v0.1.0
├── asyncssh v2.21.1
│   ├── cryptography v46.0.5
│   │   └── cffi v2.0.0
│   │       └── pycparser v2.23
│   ├── typing-extensions v4.15.0
│   └── bcrypt v5.0.0 (extra: bcrypt)
└── asyncssh[bcrypt] v2.21.1 (group: dev)
    ├── cryptography v46.0.5
    │   └── cffi v2.0.0
    │       └── pycparser v2.23
    ├── typing-extensions v4.15.0
    └── bcrypt v5.0.0 (extra: bcrypt)

Expected Output:

test v0.1.0
├── asyncssh v2.21.1
│   ├── cryptography v46.0.5
│   │   └── cffi v2.0.0
│   │       └── pycparser v2.23
│   └── typing-extensions v4.15.0
└── asyncssh[bcrypt] v2.21.1 (group: dev)
    ├── cryptography v46.0.5
    │   └── cffi v2.0.0
    │       └── pycparser v2.23
    ├── typing-extensions v4.15.0
    └── bcrypt v5.0.0 (extra: bcrypt)

This also happens in workplaces where only one package defines an extra.

Platform

Windows, Linux

Version

uv 0.11.11

Python version

3.12

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions