The PEP could require it, but I wonder if it might be more harmful than helpful. Tools aren’t required to do a build to interact with dependency-groups
, so it seems like some tools would notice (and flag it as invalid) while others would not (because they are incapable of doing so). Then the UX across tools starts to feel uneven.
I think I would like any tool which supports both and wants to smooth over the distinction to simply choose a precedence order, and handle name conflicts that way.
We could call out explicitly that a dependency group could match an extra name, but that avoiding this has the benefits that
- it reduces opportunities for user confusion
- it allows for tools which support dependency groups and extras to refer to them by name without disambiguation or precedence rules