Pushed up this edit..
On 9 November 2015 at 18:45, Robert Collins email@example.com wrote:
On 9 November 2015 at 17:55, Nathaniel Smith firstname.lastname@example.org 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 1WSP ";" 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.
diff --git a/dependency-specification.rst b/dependency-specification.rst index 9e95417..6afe288 100644 --- a/dependency-specification.rst +++ b/dependency-specification.rst @@ -84,8 +84,9 @@ URI is defined in std-66 [#std66]_::
version-cmp = "<" / "<=" / "!=" / "==" / ">=" / ">" version = 1*( DIGIT / ALPHA / "-" / "_" / "." / "*" )
versionspec = ("(" version-many ")") / version-many urlspec = "@" URI
Environment markers allow making a specification only take effect in some @@ -107,7 +108,7 @@ environments::
=/ (marker-var [*WSP marker-op *WSP marker-var])
marker = WSP marker-expr ( WSP ("and" / "or") WSP marker-expr) name-marker = ";" *WSP marker
url-marker = WSP ";" *WSP marker
Optional components of a distribution may be specified using the extras field:: @@ -131,7 +132,8 @@ Leading to the unified rule that can specify a dependency::
-Non line-breaking whitespace is optional and has no semantic meaning. +Non line-breaking whitespace is mostly optional with no semantic meaning. The +sole exception is detecting the end of a URL requirement.
-- Robert Collins email@example.com Distinguished Technologist HP Converged Cloud