Closed
Description
Bug report
As far as I know frame.f_lineno
should never be None
, yet, in the case below it is:
import sys
def tracefunc(frame, event, arg):
if frame.f_lineno is None:
raise AssertionError('frame.f_lineno is None!', frame)
return tracefunc
sys.settrace(tracefunc)
# Apparently anything we import would give a frame.f_lineno = None during tracing.
import threading
Your environment
- CPython versions tested on:
3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)]
- Operating system and architecture:
Windows
Metadata
Metadata
Assignees
Projects
Status
Done