Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing markers/requirements fails with pyparsing 3.0.5 #486

Closed
9999years opened this issue Nov 9, 2021 · 1 comment · Fixed by #489
Closed

Parsing markers/requirements fails with pyparsing 3.0.5 #486

9999years opened this issue Nov 9, 2021 · 1 comment · Fixed by #489

Comments

@9999years
Copy link

9999years commented Nov 9, 2021

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)

@ptmcg
Copy link

ptmcg commented Nov 12, 2021

Pyparsing 3.0.6 just released, implements warning suppression without changing results names.

May be moot in the face of other packaging PRs in progress, but should resolve some issues people are having with current packaging version and latest pyparsing.

Also utilizes run of packaging tests during TravisCI.

henryiii added a commit to henryiii/packaging that referenced this issue Nov 16, 2021
Fixes pypa#486 by avoiding the version of pyparsing that broke packaging.
brettcannon pushed a commit that referenced this issue Nov 16, 2021
Fixes #486 by avoiding the version of pyparsing that broke packaging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants