Broadly in favour, nicely written.
The word “owns” is used throughout, but I’d much prefer “provides”. Unlike the PyPI namespace proposal, there’s no exclusivity here - just because I specify a name in my metadata doesn’t mean nobody else can also specify it. It does mean they probably shouldn’t be installed simultaneously, which I see you’ve captured in the text, but that can still be there without implying exclusive “ownership” of the name.
I think the specification is too strict. “After installing the distribution, the specified names will be importable” is basically sufficient, and every detail you go into about how it might be imported is just another check someone is going to have to write and/or complain about. They’ll probably write it anyway, but I don’t think we gain anything from spelling it out here.
The specification currently prevents setuptools from specifying distutils with this metadata, because they use a different mechanism. Now, personally I don’t like their mechanism, so the last thing I want to see is a PEP saying that it’s a valid approach
But I don’t think it should be excluded, and the easiest way to not exclude them is to simply remove most of the specification from the PEP.
Probably most of what’s currently in specification could be “Guidance” or “Recommendation” or even just examples?
Similarly, “how does this interact with “Dynamic”” is a good discussion point, but I don’t think it warrants more specification than just “Dynamic operates as usual”, followed up by “but if you use it here’s some examples of the mess you could create; we don’t think consumers should have to deal with this and so suggest that they should probably just ignore you”. Framing it as a discussion point lets us explicitly say that we don’t think it’s valuable or helpful for this to be dynamic, which we can’t really say in a spec, but it ultimately means we don’t have to increase the burden of implementing or consuming the metadata by giving it its own set of custom rules.
Build back-ends MAY support dynamically calculating the value on the user’s behalf if desired, if the user declares the key to be dynamic.
Does this “dynamic” literally mean “dynamic”, or some other declaration? Because this is the exact kind of over-specification that’s going to get into complications (if the backend calculates it, is it now static? Is the backend allowed to change the value of dynamic when it becomes Core Metadata Dynamic (according to at least one spec: no)? So even if it could be static from sdist->wheel, Core Metadata will always say it’s not?).
This complication isn’t due to this PEP, it’s because the existing ones overspecified behaviours, but the first part (“Build back-ends MAY support …”) is where this one could get into trouble in the future. Best to drop this entire line and let it be covered by “dynamic behaves normally”, so that if we ever figure out how to do inferred metadata without it having to also be dynamic, then it’ll become possible to do this. But as it stands, I don’t think this suggestion is ever going to be simultaneously “legal” and useful.