This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: compiler: does not revert back the end_* locations
Type: Stage: resolved
Components: Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, miss-islington
Priority: normal Keywords: patch

Created on 2021-05-06 19:34 by BTaskaya, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25956 merged BTaskaya, 2021-05-06 19:39
PR 25972 merged miss-islington, 2021-05-07 17:49
Messages (2)
msg393138 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2021-05-06 19:34
Something that I've stumbled up while working on another patch is that, the compiler doesn't revert the end_lineno and the end_col_offset attributes back unlike regular lineno/col_offset. An example of this problem;
ar rcs libpython3.10d.a Modules/getbuildinfo.o Parser/token.o  Parser/pegen.o Parser/parser.o Parser/string_parser.o Parser/peg_api.(.venv38) (Python 3.8.5+) [ 10:33ÖS ]  [ isidentical@desktop:~/cpython/cpython(main✔) ]
 $ cat t3.py 
def foo(a):
    pass

foo(
    a=1,
    a=2
)

 $ ./python t3.py
  File "/home/isidentical/cpython/cpython/t3.py", line 4
    foo(
        ^
SyntaxError: keyword argument repeated: a

with the fix

 $ ./python t3.py
  File "/home/isidentical/cpython/cpython/t3.py", line 6
    a=2
    ^^^
SyntaxError: keyword argument repeated: a
msg393221 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2021-05-07 20:40
New changeset 13de28f17af02563cb8c6d0f6da3c178a4241ff3 by Miss Islington (bot) in branch '3.10':
bpo-44063: set the missing end locations on the compiler (GH-25956) (#25972)
https://github.com/python/cpython/commit/13de28f17af02563cb8c6d0f6da3c178a4241ff3
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88229
2021-05-07 20:40:57BTaskayasetstatus: open -> closed
stage: patch review -> resolved
2021-05-07 20:40:18BTaskayasetmessages: + msg393221
2021-05-07 17:49:16miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24628
2021-05-06 19:39:33BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request24617
2021-05-06 19:34:13BTaskayacreate