[issue31005] caught and stored exception creates a reference cycle outside its traceback

2017-07-24 Thread Vojtěch Fried
Vojtěch Fried added the comment: Ok. As an input for a potential discussion: Should all cases in the std library that store an exception be reported as a bug (because it can potentially mess with reference counting?) One such case is function create_connection in socket.py. If "hold_

[issue31005] caught and stored exception creates a reference cycle outside its traceback

2017-07-24 Thread Vojtěch Fried
New submission from Vojtěch Fried: I have this test case: import gc import sys import traceback def hold_world(): try: raise Exception("test1") except Exception as exc: print("exc caught in frame: ", exc.__traceback__.tb_frame) assert n