[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset bfc413ce4fa37ccb889757388102c7755e057bf5 by Pablo Galindo in branch '3.9': [3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH-24069) https://github.com/python/cpython/commit/bfc413ce4fa37ccb889757388102c775

[issue42806] Incorrect offsets in new parser for f-string substitutions

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

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22902 pull_request: https://github.com/python/cpython/pull/24069 ___ Python tracker ___ ___

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f by Pablo Galindo in branch 'master': bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) https://github.com/python/cpython/commit/bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that I also found this weird behaviour in the old parser: import ast code = """\ x = ( 'PERL_MM_OPT', ( f'wat' f'INSTALL-BASE={shlex.quote(venv)} ' f'wat' ), ) """ elem = ast.parse(code).body[0].v

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +22900 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24067 ___ Python tracker __

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-02 Thread Anthony Sottile
Anthony Sottile added the comment: by the way, here's a much smaller case which has a similar problem ``` x = ( f" {test(t)}" ) ``` -- ___ Python tracker ___

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-01 Thread Anthony Sottile
Anthony Sottile added the comment: I didn't initially, but now I have and it has the same bug in the current master: 3bf05327c2b25d42b92795d9d280288c22a0963d -- ___ Python tracker __

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-01 Thread Guido van Rossum
Guido van Rossum added the comment: Did you check this with master? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-01 Thread Anthony Sottile
Anthony Sottile added the comment: +peg parser individuals to nosy -- nosy: +gvanrossum, lys.nikolaou, pablogsal ___ Python tracker ___ ___

[issue42806] Incorrect offsets in new parser for f-string substitutions

2021-01-01 Thread Anthony Sottile
New submission from Anthony Sottile : here's a sample file. this is distilled down from an example which broke a code formatter here: https://github.com/asottile/add-trailing-comma/issues/106 def f(): x = ( 'PERL_MM_OPT', ( f'INSTALL-BASE={shlex.quote(venv)} '