Skip to content

Restore compatibility with Python 3.9's legacy LL(1) parser #4423

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

Conversation

the-13th-letter
Copy link
Contributor

The legacy LL(1) parser cannot handle compound with-statements using grouping parentheses and the EXPR as TARGET syntax, because it is not LL(1)-recognizable.

This partially reverts commit f151eec.


Fixes #4421.

With this, to the best of my knowledge1, there are no current LL(1) parser failures in the src directory of the current (6.131.32) codebase.

There are still some such non-parsable expressions left over in the tests. Should I bother with those? There should be no differences compared to running Python 3.9 with the newer PEG-based parser, save for lack of parsing errors.

Footnotes

  1. grep -E '^ *with\b'

The legacy LL(1) parser cannot handle compound with-statements using
grouping parentheses and the `EXPR as TARGET` syntax, because it is not
LL(1)-recognizable.

This partially reverts commit f151eec.
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Marco! I think this should hold us through the next few months to EOL in October 🙂

@Zac-HD Zac-HD merged commit 788e429 into HypothesisWorks:master May 31, 2025
60 checks passed
@the-13th-letter
Copy link
Contributor Author

Thanks as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hypothesis ≥ 6.130.13 on Python 3.9 doesn't support the LL(1) parser anymore
2 participants