I think the first step should be to open a discussion (or re-start the previous one) and get community consensus on what [run]
in pyproject.toml
would mean. The previous discussion did not leave me with a good sense that there’s community consensus, even on the idea of having [run]
in pyproject.toml
, much less what its semantics should be, or how it should interact with the [project]
section (the data in the two sections has considerable overlap).
I don’t think there should even be any assumption here that it’s a given that [run]
will someday be in pyproject.toml
. PEP 723 can’t guarantee that (and indeed, it doesn’t - it merely says that if we ever get a [run]
section in pyproject.toml
, it must contain the two fields defined here). And IMO, there’s some semantics to be dealt with as well - PEP 723 says “The fields defined by this PEP are equally as applicable to full-fledged projects as they are to single-file scripts”, but I don’t believe that’s true - you don’t run a “full-fledged project” in Python, you run a file. So you can’t realistically add [run]
to pyproject.toml
until you have established what it means to “run a project” in the first place…
Anyway, all of this can be debated in the discussion thread for “[run]
in pyproject.toml
”, not here.
OK, so are you saying that the regex (and therefore the reference implication in the PEP) is wrong? And if so, do you agree with me that they need to be fixed to match the above ruling, along with any text changes to clarify the intent? I really don’t like the idea of including a regex in the PEP that doesn’t implement the correct rules - that’s just crying out for people to copy the regex and not be aware that they now have a buggy implementation.
Cool. So let’s do that, then.
Um. Now that you put it like this, are you saying that if I were to reject a PEP to add [run]
to pyproject.toml
, then PEP 723 would be withdrawn at that point? Would PEP 722 be reconsidered in that case? Because I’m not at all happy that I could be put in a position where I have to decide on a PEP to add [run]
for pyproject.toml
but my judgement on that matter could be called into question because PEP 722 got rejected
You seem to be assuming that adding [run]
to pyproject.toml
would be non-controversial. On the other hand, the reason I want it as a separate PEP is precisely because I think it will be controversial.
In particular, I think that your proposal for a run table would have problems because it doesn’t tie the requirements into “being used to run the project” (which is what PEP 723 requires). So ironically, I’d reject your proposal at least in part because of PEP 723, unless you could somehow define what “running a project” meant in terms of your proposal. And I’d be looking particularly hard at the use case of viewing a directory full of Python scripts with different requirements as a project…