[Distutils] FINAL DRAFT: Dependency specifier PEP

Antoine Pitrou solipsis at pitrou.net
Tue Nov 17 13:09:50 EST 2015

On Wed, 18 Nov 2015 06:47:53 +1300
Robert Collins <robertc at robertcollins.net> wrote:
> Note that previous PEPs have either had no grammar (and
> interop issue) or partially defined grammar's (and logical issues -
> see PEP-426 for example). I think its very important we be able to
> test what we're saying should happen well.

Of course. But only for the things the PEP is useful for: i.e.,
packaging-related information. Being able to separate valid URIs and
invalid URIs is not a useful feature for an implementation of this PEP.
Yet (correct me if I'm wrong) you seem to claim it's an integral part of
being a conformant implementation.

> Implementations don't have to use the grammar, they just have to
> accept the same inputs

It means they have to invoke some logic to reject invalid URIs upfront,
even though it's none of their business (since they will later treat
the URIs as strings, anyway).

> packaging's
> implementation doesn't use the same grammar, for instance. (It uses
> pyparsing and a mix of regexes and objects).

And the URI validation bit is implemented as...?

> Since the bit you're complaining about is basically an appendix, I can
> see that it makes the PEP shorter, but not how it makes it simpler: we
> still depend on the definition of URI, because we consume URI's

"We" don't depend on it. Whatever does the URI parsing and loading does
- another library certainly, not a packaging-specific library. From a
packaging point of view, URIs are plain strings, not something you
parse to extract meaningful information.  This is called abstraction :-)



More information about the Distutils-SIG mailing list