FWIW, even though I have read all of it at some point, I can’t pretend to remember everything. I think we should very gently close the door on a lot of that discussion, and consider this proposal on its own merits and faults.
Yes, it is meant to support/improve both cases – and in precisely the way you suggest, by replacing the use of optional-dependencies/extras. I’ll need to think through how to make that clearer up-front.
The idea is that this defines the requirements data, but tools will need to refer back to it in the same way that some tools refer out to requirements.txt files.
For example, hatch could support the following usage:
[tool.hatch.envs.default]
dependency_groups = ["test"]
[tool.hatch.envs.default.scripts]
test = "pytest --some --options --here"
I don’t want to speak to the ideal/best way to integrate this for various tools. I know that as a long-time tox user, I’d like it best if I could use a flag in tox.ini’s deps grouping, e.g., deps = --group test. That has a nice symmetry with being allowed to use -r test.txt in deps already.
I take it that the open-ended nature of this is currently unclear from the PEP text. I’ll look into a way of refining this to be more apparent.
I think PEP 723 used the [run] table name only because it was what seemed like the front-runner for this table name at the time that it was written.
Whatever table name is chosen though, this is a valid point. Many of the other major options should be accounted for under Rejected Ideas.
I agree with this sentiment, although I hadn’t reached the same conclusion. I immediately disliked the fact that we were going to have, at a minimum, project.dependencies, project.optional-dependencies, and <NEW THING>.
I hadn’t considered taking requirements as closing the door though – I thought it was opening it (!).
It sounds like this is tightly related to the fact that I chose packages as the subtable name.
So if I wanted to push for that “door opening” feeling of starting to use requirements as the top-level name, could I achieve it with requirements.groups? Or does it need to be a more verbose name like requirements.dependency_groups?