Skip to content

Allow dependency groups to define a separate requires-python #11606

@zanieb

Description

@zanieb

Summary

Right now, the [dependency-groups] have the same requires-python as the [project] defines, but this causes problems when a group is only intended to be used with a different Python version range, e.g., you could only care about 3.12+ for building your documentation but 3.9+ matters for publishing your library.

See

As a meta-note, I know this was discussed elsewhere but cannot find it.

Example

[project]
name = "example"
version = "0.0.0"
requires-python = ">=3.10"

[tool.uv.dependency-groups.foo]
requires-python = ">=3.12"

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement to existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions