Mark Shannon <m...@hotpy.org> added the comment:
This is a bit of a tricky one. The problem is that the line number for an instruction is used for two purposes. 1. To calculate the line number in frame.f_lineno for tracebacks and events 2. By dis to determine which lines are present and where they start. If we set the lineno for the initial RESUME instruction in a module, we break dis and coverage for modules that do not have code on line 1. If we add an explicit line-start table, we would be able to fix this, as the RESUME would have a line number for case 1, but wouldn't start a line, thus not breaking dis. An explicit line-start table has other advantages, so we probably will implement it, but maybe not until 3.12. Ned, Would it make sense in coverage.py to ignore "call" events when doing coverage, and only use "line" events? All the traces in your example are from "call" events. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46911> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com