[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I understand. I think that for IDLE, I should check that the error .text is in the line indicated, and if not, recover somehow rather than blindly marking the the indicated column. For a shell statement entry, try to find the right line. Not sure for an e

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Backporting this to 3.9 is a bit more challenging and more changes are required, so I am not backporting for 3.9 to avoid unintended side effects. -- ___ Python tracker

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +28741 pull_request: https://github.com/python/cpython/pull/30543 ___ Python tracker ___ ___

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset 19a85501cee24a6e426a431243d0adcb5664c6fe by Miss Islington (bot) in branch '3.10': bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463) https://github.com/python/cpython/commit/19a85501cee24a6e426a431243d0adcb5664c6fe

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28677 pull_request: https://github.com/python/cpython/pull/30474 ___ Python tracker _

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 by Pablo Galindo Salgado in branch 'main': bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463) https://github.com/python/cpython/commit/6fa8b2ceee38187b0ae96aee12fe4f0a5c

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I did some testing on my own using a code generator and a bunch of weird cases and I am confident this works. I am going to include this in the next alpha but will wait for your validation for some days before merging the backports. -- __

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Please Andre and Terry, test this fix as much as you want. I am quite sure is correct, but it is far-reaching so I want to make sure every situation that we can think of is correct (and remains correct). -- ___

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Andre Roberge
Andre Roberge added the comment: > This also affects 3.9 I imagine, no? Yes. And, from what I can tell, the same incorrect line is indicated at least all the way back to Python 3.6 (where it was "invalid token" instead of "invalid decimal literal). -- nosy: +aroberge

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +28666 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30463 ___ Python tracker ___

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This also affects 3.9 I imagine, no? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since #42209 was closed, a new issue seems OK. As a result of the incorrect line number, IDLE highlights one of the opening quotes on line 1. -- nosy: +pablogsal, terry.reedy -eric.smith versions: +Python 3.11 ___

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46237] Incorrect line reported in syntax error

2022-01-02 Thread arian-f
New submission from arian-f : parsing this code results in a syntax error with an incorrect line number - it's always 1 f''' { 1_a }''' resulting in: File "", line 1 ( 1_a ) ^ SyntaxError: invalid decimal literal an analogue error occurs when parsing a file instead