bpo-24565: f->f_lineno is now -1 when tracing is not set by xdegaye · Pull Request #6233 · python/cpython (original) (raw)

The PR introduces a behavior change: upon resuming a generator frame, it is not possible anymore to jump from a call trace event. This is a minor change as the jump may be done from the first line event without changing anything, and actually it can be considered as a fix as it is more consistent to forbid jumps from all call events and not only for new frames as previously.

I have checked that all the faulty use cases in issues 7238, 16482, 17277 and 17697 are ok now with this PR, and that the tests added by the PR (except test_20_return_in_caller) fail as expected when run with python built from the master branch (without the PR changes).