Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/concepts/projects/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,26 @@ default-groups = "all"
To disable this behaviour during `uv run` or `uv sync`, use `--no-default-groups`.
To exclude a specific default group, use `--no-group <name>`.

### Group `requires-python`

By default, dependency groups must be compatible with your project's `requires-python` range.

If a dependency group requires a different range of Python versions than your project, you can
specify a `requires-python` for the group in `[tool.uv.dependency-groups]`, e.g.:

```toml title="pyproject.toml" hl_lines="9-10"
[project]
name = "example"
version = "0.0.0"
requires-python = ">=3.10"

[dependency-groups]
dev = ["pytest"]

[tool.uv.dependency-groups]
dev = {requires-python = ">=3.12"}
```

### Legacy `dev-dependencies`

Before `[dependency-groups]` was standardized, uv used the `tool.uv.dev-dependencies` field to
Expand Down
Loading