Visitar URL original
bpo-43892: Validate the first term of complex literal value patterns by brandtbucher · Pull Request #25735 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20210504090200/https://github.com/python/cpython/pull/25735
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

bpo-43892: Validate the first term of complex literal value patterns #25735

Merged
merged 7 commits into from Apr 30, 2021

Conversation

@brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Apr 29, 2021 •

This fixes validation of complex literal value patterns in the parser and factors out the old compiler_pattern_capture and compiler_pattern_wildcard routines to better match the current AST.

(A few other cleanups, too.)

https://bugs.python.org/issue43892

Copy link
Member

@pablogsal pablogsal left a comment

LGTM

I checked also for refleaks (although this really doesn't add any new paths were we can leak):

❯ ./python -m test test_patma test_compile test_ast -R :
0:00:00 load avg: 1.71 Run tests sequentially
0:00:00 load avg: 1.71 [1/3] test_patma
beginning 9 repetitions
123456789
.........
0:00:00 load avg: 1.71 [2/3] test_compile
beginning 9 repetitions
123456789
.........
0:00:38 load avg: 1.40 [3/3] test_ast -- test_compile passed in 38.2 sec
beginning 9 repetitions
123456789
.........

== Tests result: SUCCESS ==

All 3 tests OK.

Total duration: 1 min 1 sec
Tests result: SUCCESS
@pablogsal
Copy link
Member

@pablogsal pablogsal commented Apr 29, 2021 •

Thanks for the cleanup, @brandtbucher ! 👌

@brandtbucher brandtbucher merged commit dbe60ee into python:master Apr 30, 2021
12 checks passed
12 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL ${{ matrix.openssl_ver }}
Details
Azure Pipelines PR #20210429.94 succeeded
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 43892 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants