Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, sbt, serhiy.storchaka, techtonik
Date 2012-12-19.19:38:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1355945903.57.0.576732221758.issue16718@psf.upfronthosting.co.za>
In-reply-to
Content
Infortunately, the behaviour is the same in 2.7 and 3.2, and only changes with 3.3, which means that this is probably related to the new implementation of the import system.
This won't be backported.

[It would be interesting to understand why there is a difference, btw... is a reference to the module held somewhere?]

A possible workaround for such module-level calls atexit.register() is to ensure that used globals are captured in the function namespace, a bit like some __del__ methods:

def _clean(_Cleanup=_Cleanup):
    ....
History
Date User Action Args
2012-12-19 19:38:23amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, techtonik, sbt, serhiy.storchaka
2012-12-19 19:38:23amaury.forgeotdarcsetmessageid: <1355945903.57.0.576732221758.issue16718@psf.upfronthosting.co.za>
2012-12-19 19:38:23amaury.forgeotdarclinkissue16718 messages
2012-12-19 19:38:23amaury.forgeotdarccreate