[New-bugs-announce] [issue33867] Module dicts are wiped on module garbage collection

natedogith1 report at bugs.python.org
Thu Jun 14 23:34:11 EDT 2018


New submission from natedogith1 <natedogith1 at gmail.com>:

When a module is garbage collected, it fills it's __dict__ with None.  issue19255 and issue18214 seem to suggest that this was fixed, along with github pull request 7140 (commit 196b0925ca55bf22ffbb97733cff3e63d4fb6e18).  However, this still seems to be an issue in 2.7.14 and 3.6.2.

>>> import sys
>>> a = type(sys)('a')
>>> b = a.__dict__
>>> b['__name__'] is None
False
>>> del a
>>> b['__name__'] is None
True

----------
components: Interpreter Core
messages: 319581
nosy: natedogith1
priority: normal
severity: normal
status: open
title: Module dicts are wiped on module garbage collection
type: behavior
versions: Python 2.7, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33867>
_______________________________________


More information about the New-bugs-announce mailing list