STINNER Victor <[email protected]> added the comment:
I wrote a patch to support <traceback object>.tb_frame=None. It works
but the traceback becomes useless because you have unable to display
the traceback. The frame is used by tb_printinternal() to get the
filename (co_filename) and the code name (co_name).
I also tried:
while tbi:
frame = tbi.tb_frame
tbi = tbi.tb_next
frame.f_locals.clear()
frame.f_globals.clear()
... and it doesn't work because the tbi variable is also removed!
A traceback object have to contain the full frame, but the frame
contains "big" objects eating your memory. A solution to your initial
problem (store exceptions) is to not store the traceback object or at
least to store it as a (list of) string. Solution already proposed by
loewis (msg29999).
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue1565525>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com