Skip to content

--no-default-groups should be able to use with --no-group and --all-groups #10890

@j178

Description

@j178

Summary

The pyproject.toml file:

[project]
name = "foo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    "itsdangerous>=2.2.0",
]

[dependency-groups]
foo = ["iniconfig"]
bar = ["blinker"]

[tool.uv]
default-groups = ["foo"]

1. --no-group can not be used with --no-default-groups

uv tree --no-default-groups --no-group bar
error: the argument '--no-default-groups' cannot be used with '--no-group <NO_GROUP>'

Usage: uv tree --no-default-groups

Expected:
uv tree --no-default-groups --no-group bar should be equivalent to uv tree --no-group foo --no-group bar.

2. --no-default-groups has higher priority than --all-groups

uv tree --all-groups --no-default-groups
Resolved 4 packages in 13ms
foo v0.1.0
└── itsdangerous v2.2.0

Expected:
uv tree --all-groups --no-default-groups should be equivalent to uv tree --no-group foo --group bar:

uv tree --no-group foo --group bar
Resolved 4 packages in 10ms
foo v0.1.0
├── itsdangerous v2.2.0
└── blinker v1.9.0 (group: bar)

Platform

Darwin 23.6.0 arm64

Version

uv 0.5.23 (ba42467 2025-01-23)

Python version

Python 3.12.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions