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-42823: Fix frame lineno when frame.f_trace is set #24099

Merged
merged 6 commits into from
Jan 5, 2021

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jan 4, 2021

Don't rely on f_trace to indicate whether f_lineno is valid.
Also includes a compiler fix, eliminating empty blocks when fixing up line numbers for exit blocks.

https://bugs.python.org/issue42823

@markshannon markshannon closed this Jan 5, 2021
@markshannon markshannon reopened this Jan 5, 2021
@markshannon markshannon merged commit ee9f98d into python:master Jan 5, 2021
@markshannon markshannon deleted the fix-frame-lineno branch January 5, 2021 12:04
@nedbat
Copy link
Member

nedbat commented Jan 6, 2021

This has caused a regression for C-implemented trace functions. See the bpo for details.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
* Add test for frame.f_lineno with/without tracing.

* Make sure that frame.f_lineno is correct regardless of whether frame.f_trace is set.

* 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.

4 participants