Xavier de Gaye <xdeg...@gmail.com> added the comment: Those are the changes with the current behavior from the behavior in 3.5 observed at the time of the initial bug report: python 3.7: return.py Unchanged. exception.py After a jump from the 'exception' event into the previous statement, the ensuing 'step' command triggers a trace 'return' event. jump.py The sequence of trace events is unchanged and Python aborts now at the last 'step' command with: python: Python/ceval.c:1083: _PyEval_EvalFrameDefault: Assertion `STACK_LEVEL() <= co->co_stacksize' failed. python 3.8: return.py Unchanged. exception.py Unchanged from 3.7. jump.py The sequence of trace events is unchanged and the last 'step' command prints now the cryptic error msg: TypeError: 'NoneType' object is not callable > /path/to/jump.py(2)gen()->0 -> for i in range(1):
Applying the last patch fixes both 3.7 and 3.8. I can build a PR from this patch. An explanation should be given for the behavior of 3.7 and 3.8 in the jump.py case. ---------- title: cannot jump from a return after setting f_lineno -> cannot jump from a 'return' or 'exception' trace event versions: +Python 3.7, Python 3.8 -Python 3.5 Added file: https://bugs.python.org/file47463/exception.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue17288> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com