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

Incorrect hint about forgetting a comma #90398

Closed
aroberge mannequin opened this issue Jan 3, 2022 · 6 comments
Closed

Incorrect hint about forgetting a comma #90398

aroberge mannequin opened this issue Jan 3, 2022 · 6 comments
Labels
3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@aroberge
Copy link
Mannequin

aroberge mannequin commented Jan 3, 2022

BPO 46240
Nosy @vstinner, @aroberge, @lysnikolaou, @pablogsal, @miss-islington
PRs
  • bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished #30378
  • [3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378) #30390
  • [3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378) #30819
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2022-01-23.03:50:27.257>
    created_at = <Date 2022-01-03.12:02:24.116>
    labels = ['interpreter-core', '3.10', '3.11']
    title = 'Incorrect hint about forgetting a comma'
    updated_at = <Date 2022-01-23.03:50:27.256>
    user = 'https://github.com/aroberge'

    bugs.python.org fields:

    activity = <Date 2022-01-23.03:50:27.256>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-01-23.03:50:27.257>
    closer = 'vstinner'
    components = ['Parser']
    creation = <Date 2022-01-03.12:02:24.116>
    creator = 'aroberge'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46240
    keywords = ['patch']
    message_count = 6.0
    messages = ['409578', '409664', '409667', '411325', '411337', '411339']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'aroberge', 'lys.nikolaou', 'pablogsal', 'miss-islington']
    pr_nums = ['30378', '30390', '30819']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46240'
    versions = ['Python 3.10', 'Python 3.11']

    @aroberge
    Copy link
    Mannequin Author

    aroberge mannequin commented Jan 3, 2022

    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.

    @aroberge aroberge mannequin added 3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jan 3, 2022
    @pablogsal
    Copy link
    Member

    New changeset 70f415f by Pablo Galindo Salgado in branch 'main':
    bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
    70f415f

    @pablogsal
    Copy link
    Member

    Thanks Andre for the report!

    @vstinner
    Copy link
    Member

    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.

    @vstinner vstinner reopened this Jan 23, 2022
    @vstinner vstinner reopened this Jan 23, 2022
    @pablogsal
    Copy link
    Member

    New changeset 633db1c 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)
    633db1c

    @vstinner
    Copy link
    Member

    Ah, thanks for the backport :-)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants