[issue1868] threading.local doesn't free attrs when assigning thread exits

Christian Heimes report at bugs.python.org
Thu Aug 28 23:09:20 CEST 2008


Christian Heimes <lists at cheimes.de> added the comment:

Good catch, Ben!

The generic setattr/getattr functions don't work as expected when the
base class doesn't provide a __dict__. They are setting the attributes
in the subclass' __dict__ instead of the thread local dict.

My patch fixes the behavior. However it might be a better idea to make
the threadlocal class non subclass-able.

Added file: http://bugs.python.org/file11297/threading_local2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1868>
_______________________________________


More information about the Python-bugs-list mailing list