Message158510
| Author |
kristjan.jonsson |
| Recipients |
Jim.Jewett, amaury.forgeotdarc, asvetlov, dstanek, kristjan.jonsson, loewis, pitrou, rhettinger, stutzbach, tim.peters |
| Date |
2012年04月16日.22:05:51 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334613952.18.0.205398524758.issue9141@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I've stumbled upon further cases of this problem, and a possible serious bug in python 3.
the _PyIOBase_finalize() will invoke a "close" method on the object if the object isn't closed. This is the same as the object having a __del__ method. Yet, these objects are not treated as having finalizers by the garbage collector, and indeed, _PyIOBase_finalize() is called by the tp_clear() slot of several derived types. Surely, if these objects define non-trivial 'close' members, they must not be called during garbage collection. |
|