Skip to content

bpo-42246: Make sure that f_lasti, and thus f_lineno, is set correctly after raising or reraising an exception - #23803

Merged
markshannon merged 3 commits into
python:masterfrom
markshannon:pep-626-after-raise
Dec 17, 2020
Merged

markshannon merged 3 commits into
python:masterfrom
markshannon:pep-626-after-raise

Conversation

@markshannon

@markshannon markshannon commented Dec 16, 2020 •

Copy link
Copy Markdown
Member

PEP 626 requires that f_lineno always contains the last line executed.
This PR makes sure that is true, even after an exception is raised.

This is, hopefully, the last step in the rather-more-work-than-I-expected implementation of PEP 626.

https://bugs.python.org/issue42246

@markshannon
markshannon merged commit bf353f3 into python:master Dec 17, 2020
@markshannon
markshannon deleted the pep-626-after-raise branch December 17, 2020 13:57
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…ectly after raising or reraising an exception (pythonGH-23803)

* Ensure that f_lasti is set correctly after an exception is raised to conform to PEP 626.

* Update importlib

* Add NEWS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants