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
gh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match statements #93680
Conversation
Should there be a test for this? |
I submitted the PR so we can start checking that it works in other cases. I will be adding a bunch of cases, but the tests are limited because there is nothing crashing, although I can add a bunch of cases that would take years to succeed. |
…nce patterns in match statements
I can confirm that the new test just doesn't finish on |
Thanks @pablogsal for the PR, and @ambv for merging it |
Sorry, @pablogsal and @ambv, I could not cleanly backport this to |
…nce patterns in match statements (pythonGH-93680) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 53a8b17) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
GH-93689 is a backport of this pull request to the 3.11 branch. |
Are you preparing the backport or should I do it? @ambv |
…d sequence patterns in match statements (pythonGH-93680) Co-authored-by: Łukasz Langa <lukasz@langa.pl>. (cherry picked from commit 53a8b17) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
GH-93690 is a backport of this pull request to the 3.10 branch. |
Thanks for the quick fix, @pablogsal! |
closes: #93671