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
2.3 inspect.getframeinfo wrong tb line numbers #40257
Comments
inspect.getframeinfo always uses f_lineno even when tb.tb_frame.f_lineno==tb.tb_lineno so user functions like inspect.getinnerframes (and I fixed this using the attached patch. This script illustrates via cgitb. raise_an_error()
############ |
Logged In: YES Whoops tabs and all that the above script should look like raise_an_error()
#####finish The same problem occurs with inspect.trace. this code ie the returned trace doesn't reflect the current traceback, |
Logged In: YES python-2.4a0-954364.patch affects inspect.py, |
Logged In: YES In the test program, the exception is raised at line 3, but the .trace() call |
Logged In: YES Alternative version of the patch. |
Logged In: YES Applied to both CVS HEAD and the 2.3 branch. Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: