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?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2021-01-20.00:07:04.832>
created_at = <Date 2021-01-08.03:03:30.904>
labels = ['3.10']
title = 'Improve error messages regarding unclosed parentheses'
updated_at = <Date 2021-01-20.19:12:05.406>
user = 'https://github.com/pablogsal'
activity = <Date 2021-01-20.19:12:05.406>
actor = 'miss-islington'
assignee = 'none'
closed = True
closed_date = <Date 2021-01-20.00:07:04.832>
closer = 'pablogsal'
components = 
creation = <Date 2021-01-08.03:03:30.904>
creator = 'pablogsal'
dependencies = 
files = 
hgrepos = 
issue_num = 42864
keywords = ['patch']
message_count = 4.0
messages = ['384630', '385307', '385338', '385362']
nosy_count = 3.0
nosy_names = ['lys.nikolaou', 'pablogsal', 'miss-islington']
pr_nums = ['24161', '24266', '24273']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue42864'
versions = ['Python 3.10']
The text was updated successfully, but these errors were encountered:
Consider this file:
x = (
The error that we get is:
❯ python ../a.py
File "/home/pablogsal/github/python/master/../a.py", line 6
SyntaxError: unexpected EOF while parsin
This is quite uninformative of the actual problem, which is the closed parentheses.
The same happens with something like this:
File "/home/pablogsal/github/python/master/lel.py", line 3
SyntaxError: unexpected EOF while parsing
With some effort, we can include the location of the unclosed parentheses.
Sorry, something went wrong.
New changeset d6d6371 by Pablo Galindo in branch 'master':
bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161)
New changeset ae7d3cd by Pablo Galindo in branch 'master':
bpo-42864: Fix compiler warning in the tokenizer with the new paren stack for column numbers (GH-24266)
New changeset c3f167d by Pablo Galindo in branch 'master':
bpo-42864: Simplify the tokenizer exceptions after generic SyntaxError (GH-24273)
No branches or pull requests