Message298964
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_world" is a function in an external code and the reference cycle problem only appears in an exceptional case it is hard to debug and it can hardly be easily fixed.
If "hold_world" is in an external code, it may be impossible to deal with. You can only diligently set to None or del in each function on the stack. But if you have a factory function that actually produces an object you don't want to be garbage collected, you can't set the reference to None before returning it.
It is surprising that the object is affected by a function that does not know about it. It is not stored globally, it is not passed to it. It just happens to be at a wrong time at a wrong place.
Should traceback.clear_frames clear the "back referenced" frames? |
|
Date |
User |
Action |
Args |
2017-07-24 12:59:37 | vojtechfried | set | recipients:
+ vojtechfried, mark.dickinson |
2017-07-24 12:59:36 | vojtechfried | set | messageid: <1500901176.99.0.206197889018.issue31005@psf.upfronthosting.co.za> |
2017-07-24 12:59:36 | vojtechfried | link | issue31005 messages |
2017-07-24 12:59:36 | vojtechfried | create | |
|