This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect hint about forgetting a comma
Type: Stage: resolved
Components: Parser Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: aroberge, lys.nikolaou, miss-islington, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2022-01-03 12:02 by aroberge, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30378 merged pablogsal, 2022-01-03 23:31
PR 30390 closed miss-islington, 2022-01-04 10:41
PR 30819 merged pablogsal, 2022-01-23 02:30
Messages (6)
msg409578 - (view) Author: Andre Roberge (aroberge) * Date: 2022-01-03 12:02
Given the following code containing an unclosed parenthesis:

a = (1, 2
b = 3

Here is the resulting SyntaxError:

> python ignore.py
  File "C:\...\ignore.py", line 1
    a = (1, 2
            ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

This incorrect hint is present in 3.10.1 and 3.11.0a3.
msg409664 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2022-01-04 10:41
New changeset 70f415fb8b632247e28d87998642317ca7a652ae by Pablo Galindo Salgado in branch 'main':
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
https://github.com/python/cpython/commit/70f415fb8b632247e28d87998642317ca7a652ae
msg409667 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2022-01-04 10:44
Thanks Andre for the report!
msg411325 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-23 01:06
I reopen the issue: the backport to 3.10 failed, PR 30390. Tests failed and there is now a merge conflict.

Either decide to not backport the fix, or please update the backport.
msg411337 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2022-01-23 03:10
New changeset 633db1c4eb863a1340e45c353e36f2f8dcf5945c by Pablo Galindo Salgado in branch '3.10':
[3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378). (GH-30819)
https://github.com/python/cpython/commit/633db1c4eb863a1340e45c353e36f2f8dcf5945c
msg411339 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-23 03:50
Ah, thanks for the backport :-)
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90398
2022-01-23 03:50:27vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg411339

stage: patch review -> resolved
2022-01-23 03:10:40pablogsalsetmessages: + msg411337
2022-01-23 02:30:16pablogsalsetstage: resolved -> patch review
pull_requests: + pull_request29005
2022-01-23 01:06:51vstinnersetstatus: closed -> open

nosy: + vstinner
messages: + msg411325

resolution: fixed -> (no value)
2022-01-04 10:44:50pablogsalsetstatus: open -> closed
resolution: fixed
messages: + msg409667

stage: patch review -> resolved
2022-01-04 10:41:31miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28599
2022-01-04 10:41:30pablogsalsetmessages: + msg409664
2022-01-03 23:31:56pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28588
2022-01-03 12:02:24arobergecreate