Skip to content

Question: What’s the difference between optional-dependencies and dependency-groups in pyproject.toml? #9011

@pplmx

Description

@pplmx

Hi,

I have a question regarding the configuration of dependencies in pyproject.toml.

I’ve noticed that both optional-dependencies and dependency-groups seem to handle optional dependencies in a similar way, so I'm a bit confused about how they differ and when each should be used. Could you clarify the following points?

  • Purpose: What is the intended purpose of optional-dependencies versus dependency-groups?

  • Usage Scenarios: In what specific scenarios would it make sense to use one over the other?

Any insights or examples you could provide would be really helpful.

Thanks in advance for your time and assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions