chore: use dependency groups (PEP 735) - #106
Conversation
wpbonelli
left a comment
There was a problem hiding this comment.
Thanks @mwtoews, is compatibility with older versions of pip not sufficient reason to have both dependency-groups and optional-dependencies? It's a bit of a pain to keep them in sync but we already do so in devtools. The main motivation there is not pip compatibility, it's that the groups are user-facing, not just internal. But I wonder if it's worth supporting older pip for a while, since PEP 735 support came only last year.
|
I don't think that duplication of lists of dependencies for both
|
|
Is it atypical for projects to have both internal and user-facing groups? What do you suggest doing for e.g. devtools and flopy? |
|
I think extras are pretty useful user-facing options, but they are limited to pip-users (conda just introduced a similar concept via CEP 44 implemented in rattler). But I consider dependency groups (test, lint, docs, etc.) to be internal/developer features, and they are not published in the metadata to PyPI, e.g. I'll look into a PR to implement this for flopy. |

Use dependency groups, which is a standard Python feature introduced in PEP 735 to group a list of project dependencies, usually for internal development. This is preferred instead of creating optional dependencies, which is a user-facing option to install package extras.
Note that
uv syncwill include the "dev" group by default.