Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 17, 2020

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Dec 16, 2020

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants