Skip to content

gh-105042: Disable unmatched parens syntax error in python tokenize - #105061

Merged
pablogsal merged 3 commits into
python:mainfrom
lysnikolaou:tokenize-unmatched-parens
May 30, 2023
Merged

gh-105042: Disable unmatched parens syntax error in python tokenize#105061
pablogsal merged 3 commits into
python:mainfrom
lysnikolaou:tokenize-unmatched-parens

Conversation

@lysnikolaou

@lysnikolaoulysnikolaou commented May 29, 2023

Copy link
Copy Markdown
Member

Comment threadPython/Python-tokenize.c Outdated
@pablogsal

Copy link
Copy Markdown
Member

We also need a bunch of tests that cover these, one in the inspect module and the other in the tokenize module

Comment threadLib/tokenize.py Outdated
Comment threadParser/tokenizer.c Outdated
@lysnikolaou
lysnikolaouforce-pushed the tokenize-unmatched-parens branch from 049da25 to ed1237aCompareMay 30, 2023 09:55
@lysnikolaou
lysnikolaou marked this pull request as ready for review May 30, 2023 09:56
@lysnikolaou

Copy link
Copy Markdown
MemberAuthor

@pablogsal This is ready for another review.

@pablogsal

pablogsal commented May 30, 2023

Copy link
Copy Markdown
Member

We also need a bunch of tests that cover these, one in the inspect module and the other in the tokenize module

Can you add a couple of tests for this?

Maybe something on these lines: #105042 (comment) in the inspect module here:

deftest_parenthesized_multiline_lambda(self):

@lysnikolaou

Copy link
Copy Markdown
MemberAuthor

@pablogsal Thanks for the reminder! Tests added in c7481a5.

@pablogsalpablogsal 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

Fantastic work!

@pablogsalpablogsal added the needs backport to 3.12 only security fixes label May 30, 2023
@pablogsal
pablogsal merged commit 70f315c into python:mainMay 30, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @lysnikolaou for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 30, 2023
…nize (pythonGH-105061)
(cherry picked from commit 70f315c)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-105120 is a backport of this pull request to the 3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12 only security fixes label May 30, 2023
pablogsal pushed a commit that referenced this pull request May 31, 2023
…enize (GH-105061) (#105120)
gh-105042: Disable unmatched parens syntax error in python tokenize (GH-105061)
(cherry picked from commit 70f315c)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@lysnikolaou@pablogsal@miss-islington@bedevere-bot