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 ncoghlan
Recipients docs@python, ncoghlan
Date 2013-09-19.08:25:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Changing the title, since I spotted a few other problems as well.

The weakref docs still refer to module globals being set to None during shutdown. That is no longer the case. There are also some assumptions about cycles with __del__ methods not being garbage collected, which is no longer true given PEP 442's improvements to module finalization.

I also realised that the introduction of weakref.finalize and the elimination of the "set globals to None" hack gives Python relatively straightforward module destructors [1]:

    import weakref, sys
    mod = sys.modules[__name__]
    def del_this():
        # implicit ref to the module globals from the function body
    weakref.finalize(mod, del_this)

Date User Action Args
2013-09-19 08:25:12ncoghlansetrecipients: + ncoghlan, docs@python
2013-09-19 08:25:12ncoghlansetmessageid: <>
2013-09-19 08:25:12ncoghlanlinkissue19047 messages
2013-09-19 08:25:11ncoghlancreate