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

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

Merged
merged 3 commits into from
May 30, 2023

Conversation

lysnikolaou
Copy link
Contributor

@lysnikolaou lysnikolaou commented May 29, 2023

Python/Python-tokenize.c Outdated Show resolved Hide resolved
@pablogsal
Copy link
Member

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

Lib/tokenize.py Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
@lysnikolaou lysnikolaou marked this pull request as ready for review May 30, 2023 09:56
@lysnikolaou
Copy link
Contributor Author

@pablogsal This is ready for another review.

@pablogsal
Copy link
Member

pablogsal commented May 30, 2023

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:

def test_parenthesized_multiline_lambda(self):

@lysnikolaou
Copy link
Contributor Author

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

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM

Fantastic work!

@pablogsal pablogsal added the needs backport to 3.12 bug and security fixes label May 30, 2023
@pablogsal pablogsal merged commit 70f315c into python:main May 30, 2023
@miss-islington
Copy link
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

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants