Skip to content

pyproject: Switch to using dependency groups #2

Open
@akkornel

Description

@akkornel

Within pyproject.toml, we use the project.optional-dependencies group to specify Python packages that we only need for testing, or for building documentation. Although it is OK to do by convention, it is no longer the technically-correct way to encode this information.

In October 2024, PEP 735 created Dependency Groups. The idea behind Dependency Groups is that Optional Dependencies are meant for enabling certain optional client-facing functionality. For example, if you write a text-parsing package, you might want to offer a pure-Python version and a Cython version; folks would specify the Cython version via something like pip install text-parser[cython]: In this example, cython is an optional dependency.

Most packages use optional dependencies for docs and test, even though this is not client-facing. Dependency groups provides a way for packages to specify dependencies that should not make it into distributed package metadata.

We do not have any properly-optional dependencies. So, this project should be switched over to using Dependency Groups

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestupstreamThis depends on something that we use being changed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions