Skip to content

Commit 1b617f8

Browse files
authored
Merge pull request #1969 from notatallshaw/fix-arbitrary-equality-grammar
Fix grammar for arbitrary equality comparisons in dependency specifiers
2 parents 41adab7 + 5cabdcb commit 1b617f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/specifications/dependency-specifiers.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Versions may be specified according to the rules of the
6363
:ref:`Version specifier specification <version-specifiers>`. (Note:
6464
URI is defined in :rfc:`std-66 <3986>`)::
6565

66-
version_cmp = wsp* '<' | '<=' | '!=' | '==' | '>=' | '>' | '~=' | '==='
66+
version_cmp = wsp* '<=' | '<' | '!=' | '===' | '==' | '>=' | '>' | '~='
6767
version = wsp* ( letterOrDigit | '-' | '_' | '.' | '*' | '+' | '!' )+
6868
version_one = version_cmp version wsp*
6969
version_many = version_one (',' version_one)* (',' wsp*)?
@@ -339,7 +339,7 @@ Complete Grammar
339339
The complete parsley grammar::
340340

341341
wsp = ' ' | '\t'
342-
version_cmp = wsp* <'<=' | '<' | '!=' | '==' | '>=' | '>' | '~=' | '==='>
342+
version_cmp = wsp* <'<=' | '<' | '!=' | '===' | '==' | '>=' | '>' | '~='>
343343
version = wsp* <( letterOrDigit | '-' | '_' | '.' | '*' | '+' | '!' )+>
344344
version_one = version_cmp:op version:v wsp* -> (op, v)
345345
version_many = version_one:v1 (',' version_one)*:v2 (',' wsp*)? -> [v1] + v2
@@ -529,6 +529,8 @@ History
529529
- August 2025: The suggested name validation regex was fixed to match the field
530530
specification (it previously finished with ``$`` instead of ``\Z``,
531531
incorrectly permitting trailing newlines)
532+
- December 2025: Ensure ``===`` before ``==`` in grammar, to allow arbitrary
533+
equality comparisons to be parsed.
532534

533535

534536
References

0 commit comments

Comments
 (0)