[Distutils] FINAL DRAFT: Dependency specifier PEP

Robert Collins robertc at robertcollins.net
Tue Nov 17 12:47:53 EST 2015


On 18 November 2015 at 06:35, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Wed, 18 Nov 2015 06:32:35 +1300
> Robert Collins <robertc at robertcollins.net> wrote:
>> >
>> > The only place where URIs are used seem to be the "urlspec" rule, and
>> > probably you can accept any opaque string there.
>>
>> Uhm, why are you making this suggestion? What problem will we solve by
>> using a proxy rule?
>
> Making the PEP simpler, making implementations simpler, avoiding bugs
> in implementations which may otherwise try to implement full URI
> matching, avoiding having to issue a PEP update whenever the IETF
> updates the definition.
>
> These are the four I can think about, anyway :-)

Taking them in reverse order:
We reference the URI standard, so when that changes, our definition
changes - we can update the combined grammar, but we don't need to
update anything we've defined (unless the URI change is something that
invalidates our symbol delimitation, in which case we'd have to
anyway.

The grammar is a reference, meant to act as a test in the event of
disagreement should two implementations differ from each other. The
packaging implementation for instance uses pyparsing and thus by
necessity a different grammar. Implementations don't have to use any
of it - I'm not sure, unless we require that implementations use
OMeta, how we're causing (or preventing) bugs by changing the combined
grammar. 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.

Implementations don't have to use the grammar, they just have to
accept the same inputs and interpret it in the same ways. packaging's
implementation doesn't use the same grammar, for instance. (It uses
pyparsing and a mix of regexes and objects).

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 - and
thats a PEP-440 choice, so changing that is something I'd seek a very
strong reason for, since its accepted.

-Rob


-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud


More information about the Distutils-SIG mailing list