[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4e4d35d3325fb1e05dad43bd1ec73f14c3c5dc0a by Łukasz Langa in branch '3.9': [3.9] bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814) (GH-27817) https://github.com/python/cpython/commit/4e4d35d3325fb1e05dad43bd1ec7

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26282 pull_request: https://github.com/python/cpython/pull/27817 ___ Python tracker ___ _

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread miss-islington
miss-islington added the comment: New changeset 846a10fc45ef83b41d1b1b568a9ee8012f37c8c2 by Miss Islington (bot) in branch '3.10': bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814) https://github.com/python/cpython/commit/846a10fc45ef83b41d1b1b568a9ee8012

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b2f68b190035540872072ac1d2349e7745e85596 by Pablo Galindo Salgado in branch 'main': bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814) https://github.com/python/cpython/commit/b2f68b190035540872072ac1d2349e7745e

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26281 pull_request: https://github.com/python/cpython/pull/27816 ___ Python tracker _

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +26279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27814 ___ Python tracker __

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem is not the keyword, is that we are parsing correctly until the "and" and we find the comma there. It happens with anything that invalidates more items: >>> from math import sin, cos, $ tan File "", line 1 from math import sin, cos, $

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: Based on what I just read on https://github.com/davidhalter/parso/blob/master/parso/python/issue_list.txt I gather that this exception is only raised in the context of an import statement with a trailing comma (usually followed by nothing). -- __

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hummm, interesting. I wonder if this only happens with keywords or if this can be reproduced with other constructs -- ___ Python tracker ___

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: This message is not new to Python 3.10 as it is also shown with Python 3.9.5. >>> from math import sin, cos, and tan File "", line 1 from math import sin, cos, and tan ^ SyntaxError: trailing comma not allowed without surrou

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
New submission from Andre Roberge : Consider the following four slightly different examples: Python 3.10.0rc1 ... >>> from math import sin and cos File "", line 1 from math import sin and cos ^^^ SyntaxError: invalid syntax >>> from math import sin, cos, and ta