-
-
Notifications
You must be signed in to change notification settings - Fork 290
3.2.2 breaks our CI #600
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
Comments
Thanks for submitting so quickly! Unfortunately, the message is not correct for that commit (hit push too soon before fixing). Fortunately the commit does include the addition of this bullet in the CHANGES file, giving more details about what happened in
So at the moment, I'd say the change is intentional, though it may have had some unwanted side-effect. An MRE would surely help, maybe just the test line indicated by your CI log could show what you got vs what you expected (plus the actual parser definition, of course). If I get time this evening, I'll look at your project and see if anything leaps out at me. |
I saw it was a duplicate commit message. I will try to create an MRE (tomorrow), but I wanted to ensure that the indentation change made in the PR was correct, as this change would make our CI pass again: diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py
index 7f62df8..ff87156 100644
--- a/pyparsing/helpers.py
+++ b/pyparsing/helpers.py
@@ -544,10 +544,10 @@ def nested_expr(
raise ValueError(
"opening and closing arguments must be strings if no content expression is given"
)
- if ParserElement.DEFAULT_WHITE_CHARS:
- content.set_parse_action(
- lambda t: t[0].strip(ParserElement.DEFAULT_WHITE_CHARS)
- )
+ if ParserElement.DEFAULT_WHITE_CHARS:
+ content.set_parse_action(
+ lambda t: t[0].strip(ParserElement.DEFAULT_WHITE_CHARS)
+ )
ret = Forward()
if ignoreExpr is not None: (The code in question is some ten-year-old code, so I would not advise going anywhere near it 🙃) |
Yep - I remember making that change, and having a "what level of indentation should this be?" moment. Now I'm trying to compose a failing test for the current code so that the fix will pass. |
+1 many pipelines broken, pinning to 3.2.1 as workaround. |
Any chance you could extricate a minimal reproducible example from one of those pipelines? It will be some place using the |
I am sorry I don't have much bandwidth to figure out the exact issue and replicate, but I can provide this logs of the failing tests I hope it helps:
|
@luisglft [later] |
@hoxbro - I think this reproduces your error, after downloading the holoviews repo and looking at the pyparsing parsers defined there: def testNestedExpressions4(self):
allowed = pp.alphas
plot_options_short = pp.nestedExpr('[',
']',
content=pp.OneOrMore(pp.Word(allowed) ^ pp.quotedString)
).setResultsName('plot_options')
self.assertParseAndCheckList(
plot_options_short,
"[slkjdfl sldjf [lsdf'lsdf']]",
[['slkjdfl', 'sldjf', ['lsdf', "'lsdf'"]]]
) Produces similar truncated output, and the same fix fixes it. |
Pyparsing 3.2.3 just pushed to pypi with this fix. |
Thank you for the quick fix and release 👍 |
With the release of 3.2.2, our CI started to fail.
I currently don't have an MRE, but I have tracked the problem to this commit: b6719a6 and these lines, now always run wheres before this commit only ran
if content is None
(the indention was changed in this PR)pyparsing/pyparsing/helpers.py
Lines 547 to 550 in b0a8be6
I don't know if this is expected behavior or a bug. If it is expected behavior, I would love to see a way to restore the old behavior.
The text was updated successfully, but these errors were encountered: