[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r83918 (py3k), r83919 (3.1) and r83920 (2.7) after Benjamin ok'ed it on IRC. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1 _

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: -easy Added file: http://bugs.python.org/file18364/threadlocal.patch ___ Python tracker ___ _

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file18363/threadlocal.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a patch. It modifies the implementation to use intermediate dummy objects and various weakrefs. This allows to break reference cycles even when the thread state dict is still alive (because it isn't involved in the ref cycles anymore). This also has t

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: -Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is much more complicated than I thought. The threadstate dict holds a strong reference to each local dict, and therefore the GC will refuse to collect the local dict when there's a cycle. (when there's no cycle, the local dict is cleared manually by the l

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: pitrou -> keywords: +easy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 ___ Python tracker ___ __

[issue3757] threading.local doesn't support cyclic garbage collecting

2010-08-01 Thread Georg Brandl
Georg Brandl added the comment: Do you want to fix that? -- assignee: -> pitrou nosy: +georg.brandl ___ Python tracker ___ ___ Python

[issue3757] threading.local doesn't support cyclic garbage collecting

2008-09-02 Thread Antoine Pitrou
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() >