New submission from Antoine Pitrou <[EMAIL PROTECTED]>: 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue3757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com