From 3ab0328dbd8208c4dae3aad9a5182ef6052a0b3a Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 12 Dec 2022 00:13:22 +0100 Subject: [PATCH 1/3] Dependency Specifiers: Don't require whitespace after URL otherwise would `numpy @ https://example.org/numpy` is not a valid specifier (missing whitespace after the URL). This already what pip and packaging do and also what the parsley grammar says --- source/specifications/dependency-specifiers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst index a5bc52bc7..5453e367c 100644 --- a/source/specifications/dependency-specifiers.rst +++ b/source/specifications/dependency-specifiers.rst @@ -113,7 +113,7 @@ Giving us a rule for name based requirements:: And a rule for direct reference specifications:: - url_req = name wsp* extras? wsp* urlspec wsp+ quoted_marker? + url_req = name wsp* extras? wsp* urlspec (wsp+ quoted_marker?)? Leading to the unified rule that can specify a dependency.:: From 4193e048f5bac6b5e996000e329cddc069a0a40a Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 12 Dec 2022 00:17:35 +0100 Subject: [PATCH 2/3] Dependency Specifiers: Require whitespace before `in` and `not in` Otherwise `numpy; os_namein 'posix'` would be a valid specifier which it isn't --- source/specifications/dependency-specifiers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst index 5453e367c..9b29669d9 100644 --- a/source/specifications/dependency-specifiers.rst +++ b/source/specifications/dependency-specifiers.rst @@ -70,7 +70,7 @@ URI is defined in :rfc:`std-66 <3986>`):: Environment markers allow making a specification only take effect in some environments:: - marker_op = version_cmp | (wsp* 'in') | (wsp* 'not' wsp+ 'in') + marker_op = version_cmp | (wsp+ 'in') | (wsp+ 'not' wsp+ 'in') python_str_c = (wsp | letter | digit | '(' | ')' | '.' | '{' | '}' | '-' | '_' | '*' | '#' | ':' | ';' | ',' | '/' | '?' | '[' | ']' | '!' | '~' | '`' | '@' | '$' | '%' | '^' | From f91e32f29244fb8a9d313a9701b81036de25842e Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 12 Dec 2022 00:19:24 +0100 Subject: [PATCH 3/3] Dependency Specifiers: Require whitespace after `in` and `not in` Otherwise `numpy; os_name in'posix'` and `numpy; os_name inos_name` would be valid. pypa/packaging 22.0 actually allows currently `numpy; os_name in'posix'` --- source/specifications/dependency-specifiers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst index 9b29669d9..8fc445013 100644 --- a/source/specifications/dependency-specifiers.rst +++ b/source/specifications/dependency-specifiers.rst @@ -70,7 +70,7 @@ URI is defined in :rfc:`std-66 <3986>`):: Environment markers allow making a specification only take effect in some environments:: - marker_op = version_cmp | (wsp+ 'in') | (wsp+ 'not' wsp+ 'in') + marker_op = version_cmp | (wsp+ 'in' wsp+) | (wsp+ 'not' wsp+ 'in' wsp+) python_str_c = (wsp | letter | digit | '(' | ')' | '.' | '{' | '}' | '-' | '_' | '*' | '#' | ':' | ';' | ',' | '/' | '?' | '[' | ']' | '!' | '~' | '`' | '@' | '$' | '%' | '^' |