[issue1522237] _threading_local.py logic error in _localbase __new__

Daniel Diniz report at bugs.python.org
Mon Mar 30 07:07:44 CEST 2009


Daniel Diniz <ajaksu at gmail.com> added the comment:

It isn't obvious to me that this issue is valid.

Some more context:

class _localbase(object):
    __slots__ = '_local__key', '_local__args', '_local__lock'

    def __new__(cls, *args, **kw):
        self = object.__new__(cls)
        key = '_local__key', 'thread.local.' + str(id(self))
        object.__setattr__(self, '_local__key', key)
        object.__setattr__(self, '_local__args', (args, kw))
        object.__setattr__(self, '_local__lock', RLock())

        if args or kw and (cls.__init__ is object.__init__):
            raise TypeError("Initialization arguments are not supported")

----------
nosy: +ajaksu2
stage:  -> test needed
type:  -> behavior
versions: +Python 2.6 -Python 2.5

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


More information about the Python-bugs-list mailing list