[Distutils] New PEP : dependency specification

Robert Collins robertc at robertcollins.net
Mon Nov 9 00:45:01 EST 2015


On 9 November 2015 at 17:55, Nathaniel Smith <njs at pobox.com> wrote:
> The new version is looking pretty good to me!
>
> My main concern still is that specification of whitespace handling is
> still kinda confusing/underspecified. The text says "all whitespace is
> optional", but the grammar says that it's mandatory in some cases
> (e.g. url-marker, still not sure why -- I'd understand if it were
> mandatory before the ";" since ";" is a valid character in URLs, but
> it says it's mandatory afterward?), and the grammar is still wrong
> about whitespace in some cases (e.g. it says ">= 1.0" is an illegal
> versionspec).
>
> I guess the two options are either to go through carefully sprinkling
> *WSP's about at all the appropriate places, or else to tackle things
> more systematically by adding a lexer layer...

I'm happy either way. You are right though that there is one spot
where it is not optional. Thats how "url; marker stuff here"  is
defined in pip today. We could in principle define a new rule here,
such as putting markers before the url. But as markers aren't self
delimiting (blame PEP-345) that is a bit fugly. We could say 'url
1*WSP ";" *WSP marker', which would be a bit more consistent, but
different to pip's current handling. Of course, the @ syntax is
already different, so it seems reasonable to do so to me.

> Also, unrelated: do you want to import the text for PEP 426 about the
> requirements for hashes in URLs?

No, thats a PEP-440 concern [whether it should be or not] and already
documented there. If we were revising that requirement, sure, but
we're not.

-Rob


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


More information about the Distutils-SIG mailing list