This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Jim.Jewett, amaury.forgeotdarc, asvetlov, dstanek, kristjan.jonsson, loewis, pitrou, rhettinger, stutzbach, tim.peters
Date 2012-04-17.10:33:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334658793.36.0.990463551611.issue9141@psf.upfronthosting.co.za>
In-reply-to
Content
> Surely, if these objects define non-trivial 'close' members, they must 
> not be called during garbage collection.

Define "non-trivial". There are various tests for it in test_io.

Not ending up in gc.garbage is *by design*. Making file objects uncollectable as soon as they appear in a reference cycle would be a serious regression. That's why the cleanup is done in tp_dealloc instead of having a __del__.
History
Date User Action Args
2012-04-17 10:33:13pitrousetrecipients: + pitrou, tim.peters, loewis, rhettinger, amaury.forgeotdarc, kristjan.jonsson, dstanek, stutzbach, asvetlov, Jim.Jewett
2012-04-17 10:33:13pitrousetmessageid: <1334658793.36.0.990463551611.issue9141@psf.upfronthosting.co.za>
2012-04-17 10:33:12pitroulinkissue9141 messages
2012-04-17 10:33:12pitroucreate