PEP 633: Dependency specification in pyproject.toml using an exploded TOML table

@EpicWink re-reading the PEP I think there is some ambiguity introduced due to the optional-dependencies table mandating for-extra. IMHO, the use of for-extra makes for a case against needing optional-dependencies as it keeps thigns under a single dependencies table. I would suggest that we recommend optional-dependencies table be avoided.

Regarding the for-extra option, I think we should also make a mention of what needs to happen if marker contain something like python_version >= 3.6 and extra == 'http' and the specification contains for-extra = "http". The simplest resolution would be for for extra to be simply appended as and extra == '<for-extra-value>', I reckon.

2 Likes

You can recommend that optional-dependencies be removed, but I wouldnā€™t suggest avoiding it when we are doing something new like this. Do whatever gives the best ergonomics and experience for the user and if that means tweaking PEP 621 then so be it since itā€™s not an accepted PEP yet either.

This is what already happens in the reference implementation. Iā€™ll make an explicit note about it

Itā€™s have recommended to keep the style consistent in the examples. To satisfy both theirā€™s and your recommendation, one of them should be dropped. Earlier in this topic the empty string was specifically requested, so it sounds like the empty table should be disallowed.