Skip to content

Support PEP 735 Dependency Groups #4795

@harshil21

Description

@harshil21

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Now that pip 25.1 has support for PEP 735 Dependency Groups (finally!), we can use them in our project to replace the requirements.txt files we have for unit tests and linting.

Describe the solution you'd like

I suppose we can have 3 groups - [tests, docs, and all].

If I saw correctly, the spec does not allow installing optional dependencies of your own project with the "all" extra like we currently have in the dependency group. i.e. pip install . --group all wouldn't install all the optional dependencies. But something like pip install .[all] --group all should install all optional dependencies and dev dependencies.

Describe alternatives you've considered

Not doing this and staying outdated.

Additional context

uv has had this for a while, but since pip didn't support it, I didn't open an issue earlier.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions