Skip to content

Ensure we are consistently handling optional dev groups vs. extras #1823

@nathanjmcdougall

Description

@nathanjmcdougall

A common pattern before PEP735 was to use the PEP621 "extras"/optional dependency groups mechanism.

In #1795, we are looking to use the PEP621 style as evidence of dev dependencies, since setup.cfg doesn't support the PEP735 style.

There are a few concerns here:

  1. We probably need to add some detailed documentation about all the different dependency declaration mechanisms supported by usethis. There's other considerations like Poetry's bespoke style, the deprecated [tool.uv.dev-dependencies] style.
  2. Are we supporting the PEP621 style when using uv? What about Poetry?
  3. I question whether we should bother supporting setup.cfg at all i.e. questioning Infer dependencies from setup.cfg #895, or at least whether we should support the idea of dev dependencies with setup.cfg (perhaps better to raise an error in such cases, suggesting a pyproject.toml migration.) Some tools won't support setup.cfg so the implications are tricky; e.g. poetry and uv I don't think support them. In any case something needs to make it clearer to the user that we are ignoring the setup.cfg file config if it does have an [options] section etc.

On writing this, I think it's best we close #1795 until this is resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    philosophyDetermining the best design approach

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions