Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
brandtbucher merged 7 commits into
python:masterpython/cpython:masterfrom
brandtbucher:patma-parser-cleanupbrandtbucher/cpython:patma-parser-cleanupCopy head branch name to clipboard
Apr 30, 2021
Merged

bpo-43892: Validate the first term of complex literal value patterns#25735
brandtbucher merged 7 commits into
python:masterpython/cpython:masterfrom
brandtbucher:patma-parser-cleanupbrandtbucher/cpython:patma-parser-cleanupCopy head branch name to clipboard

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Apr 29, 2021

Copy link
Copy Markdown
Member

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

@pablogsal pablogsal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

pablogsal commented Apr 29, 2021

Copy link
Copy Markdown
Member

Thanks for the cleanup, @brandtbucher ! 👌

@brandtbucher brandtbucher merged commit dbe60ee into python:master Apr 30, 2021
@brandtbucher brandtbucher deleted the patma-parser-cleanup branch July 21, 2022 20:19
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.