[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 4b86c9c5146c339c689830619be9d29b8f7bf417 by Pablo Galindo Salgado in branch '3.9': [3.9] bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729) (GH-27744)

[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c28c2e1cb0dd5fc8b17514e2c4ee17415af733a4 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729) (GH-27743)

[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26222 pull_request: https://github.com/python/cpython/pull/27744 ___ Python tracker ___

[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26221 pull_request: https://github.com/python/cpython/pull/27743 ___ Python tracker ___

[issue44885] Incorrect exception highlighting for fstring format

2021-08-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8e832fb2a2cb54d7262148b6ec15563dffb48d63 by Pablo Galindo Salgado in branch 'main': bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729)

[issue44885] Incorrect exception highlighting for fstring format

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

[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ha, we have test that knows is broken: https://github.com/python/cpython/blob/f66d00fdd7e9a333accc6bf0e37173051aaa55d0/Lib/test/test_fstring.py#L217 -- ___ Python tracker

[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Actually, this has even more problems. Because we are using strstr to find the start of the expression in the parent string, if the expression is repeated the offsets are incorrectly generated: For example: print(f"Here is that {xxx} pesky {xxx}

[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem lies here: https://github.com/python/cpython/blob/f66d00fdd7e9a333accc6bf0e37173051aaa55d0/Parser/string_parser.c#L374-L389 The problem is that the strstr call will fail because the string containing the expression doesn't have the

[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: (I originally reported this.) -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list

[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Given this code: print(f"Here is that pesky {xxx/2:.3f} again") The traceback prints: Traceback (most recent call last): File "/home/pablogsal/github/python/main/lel.py", line 1, in print(f"Here is that pesky {xxx/2:.3f} again")