[New-bugs-announce] [issue3757] threading.local doesn't support cyclic garbage collecting
Antoine Pitrou
report at bugs.python.org
Tue Sep 2 14:14:08 CEST 2008
New submission from Antoine Pitrou <pitrou at free.fr>:
tp_traverse and tp_clear on threading.local are defined, but the
Py_TPFLAGS_HAVE_GC flag is not set. As a result, cycles are not collected:
>>> import threading, weakref
>>> o = threading.local()
>>> class X(object): pass
...
>>> x = X()
>>> x.o = o
>>> o.x = x
>>> wr = weakref.ref(x)
>>> del x, o
>>> import gc
>>> gc.collect()
0
>>> wr()
<__main__.X object at 0x9bb0dc4>
----------
components: Extension Modules, Library (Lib)
messages: 72332
nosy: pitrou
severity: normal
status: open
title: threading.local doesn't support cyclic garbage collecting
type: behavior
versions: Python 2.6, Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3757>
_______________________________________
More information about the New-bugs-announce
mailing list