Skip to content

Parsing markers/requirements fails with pyparsing 3.0.5 #486

@9999years

Description

@9999years

Pyparsing 3.0.5 changes the private API around originalTextFor, causing code in packaging that uses the private API to break:

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
lambda s, l, t: Marker(s[t._original_start : t._original_end])
)

This manifests as a failure in safety.

Reproduction:

from packaging.requirements import Requirement

Requirement('alabaster==0.7.12; python_version >= "3.6"\n')

The upstream issue is pyparsing/pyparsing#110 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions