I couldn’t find a specific topic about PEP 725 – Specifying external dependencies in pyproject.toml on DPO [1], but in reading it over recently, I wonder if there is a latent backward incompatibility.
From the specification:
The lack of an
[external]
table means the package either does not have any external dependencies, or the ones it does have are assumed to be present on the system already.
Isn’t it true that today, if there is no [external]
table, then it undefined whether the package has external dependencies? If so, then the PEP as currently written assigns incompatible semantics to the missing table. There’s a difference between “we don’t know what the external dependencies are” and “we know there are no unassumed defacto present external dependencies”.
Why this is relevant: if you wanted to say explicitly that you have a pure Python package, you would, under the definition in the PEP, leave out the [external]
table all together.
But then, you’re probably already doing that, however the ecosystem doesn’t know that you are positively asserting that you have a pure Python package, and thus can’t know that your package is probably “safe” to build. Hence, the backward incompatibility.
The way out would be for the PEP to ascribe undefined behavior for the lack of an [external]
table (maintaining backward compatibility), and to add a key or value in the table to positively assert “I have no external dependencies”. While that might imply pure-Python, it still leaves room for ambiguity; are you a pure-Python package or a package with dependencies “assumed to be present on the system already”?
If my analysis is correct, and we want the PEP to be both backward compatible and unambiguous, then one possible way out would be to define a PURL that means “there are no external dependencies” and allow those in (optional-)build-requires
and (optional-)host-requires
. I don’t see any relevant PURL type with the meaning of “nothing”, so possibly pkg:generic/:none:
might be used. Or the explicit shorthand :none:
would be allowed.
if I missed it, then DPO search might be lacking ↩︎