Skip to content

Detecting when PEP 735 [dependency-groups] redirects to package extra(s) #1531

@jamesbraza

Description

@jamesbraza

Is your feature request related to a problem? Please describe.

With the rise of uv (circa 2024 to 2025), now the dev extra is common. There is also PEP 735 Dependency Groups that adds standardization here as well. I am getting used to defaults "just working" for both production and development.

Currently optional_dependencies_dev_groups defaults to an empty tuple, requiring every project that uses [project.optional-dependencies] for dev dependencies to explicitly configure optional_dependencies_dev_groups.

Describe the solution you would like

deptry default optional_dependencies_dev_groups to ["dev"] when a dev group exists in [project.optional-dependencies], and otherwise fall back to the prior default of ().

If projects don't want ["dev"] being auto-used, they can specify optional_dependencies_dev_groups = [] to attain the original behavior.

Additional context

N/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions