Skip to content

Commit

Permalink
Fix marker parsing with pyparsing 3.0.5
Browse files Browse the repository at this point in the history
Closes pypa#486

Context in pyparsing: pyparsing/pyparsing#110 (comment)
  • Loading branch information
Rebecca Turner committed Nov 9, 2021
1 parent 8cb9dbf commit 7547b3e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packaging/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ class InvalidRequirement(ValueError):
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
lambda s, l, t: Marker(s[t._original_start : t._original_end])
)
MARKER_EXPR.addParseAction(lambda s, l, t: Marker(t[0]))
MARKER_SEPARATOR = SEMICOLON
MARKER = MARKER_SEPARATOR + MARKER_EXPR

Expand Down

0 comments on commit 7547b3e

Please sign in to comment.