diff --git a/docs/concepts/projects/dependencies.md b/docs/concepts/projects/dependencies.md index 22d030637..c6999813b 100644 --- a/docs/concepts/projects/dependencies.md +++ b/docs/concepts/projects/dependencies.md @@ -701,6 +701,19 @@ 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 `. +### Group `requires-python` + +If your dependency groups require a higher version of python than your project does, you can specify +a `requires-python` for the group in `[tool.uv.dependency-groups]` as follows: + +```toml title="pyproject.toml" +[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