[issue23720] __del__() order is broken since 3.4.0
Serhiy Storchaka
report at bugs.python.org
Sat Mar 21 13:39:25 CET 2015
Serhiy Storchaka added the comment:
Yes, in bug2.py we have different cycle.
a ↔ b
↓ ↓
v → d
a and b are in a cycle, and therefore v and d are in cycle. I think that in such case v always should be destroyed before d, independently of a cycle that refers them. And this is the same situation, as for io classes. A TextIOWrapper object refers a BufferedWriter object, a BufferedWriter object refers a FileIO object. and some cycle refers a TextIOWrapper object. As a result a FileIO object can be closed before a TextIOWrapper object or a BufferedWriter object flush its buffer.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23720>
_______________________________________
More information about the Python-bugs-list
mailing list