Mark Shannon <m...@hotpy.org> added the comment:

It looks like you are accessing the c field "f_lineno" directly.
That was never guaranteed to work, it just happened to.
You should use PyFrame_GetLineNumber()
If "f_lineno" is up to date, then it will be almost efficient as the direct 
field access (the overhead is a C call).
If "f_lineno" is not up to date, PyFrame_GetLineNumber() will compute the 
correct value.

In the interest of efficiency it makes sense that the internal f_line field is 
updated before CALL and RETURN trace events.
I'll make that change, but you really ought to use the API rather than probing 
into the frame internals.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42823>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to