[issue45563] inspect.getframeinfo() doesn't handle frames without lineno
Marc-Andre Lemburg
report at bugs.python.org
Sat Oct 23 05:11:28 EDT 2021
Marc-Andre Lemburg <mal at egenix.com> added the comment:
Hmm, perhaps I should reopen the ticket, even though I now found the cause.
After all, it is possible that lineno is None and inspect.getframeinfo() cannot handle it :-)
And it may be worthwhile investigating why recreation of a code object using:
return types.CodeType(co.co_argcount,
co.co_posonlyargcount,
co.co_kwonlyargcount,
co.co_nlocals, co.co_stacksize,
co.co_flags, co.co_code, co.co_consts,
co.co_names, co.co_varnames,
co.co_filename, co.co_name,
co.co_firstlineno, co.co_lnotab,
co.co_freevars, co.co_cellvars)
does not necessarily create a valid copy of a code object co.
----------
resolution: not a bug ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________
More information about the Python-bugs-list
mailing list