This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cindykrafft
Recipients cindykrafft
Date 2015-01-28.06:02:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The tp_name field in thread.LockType is set as "thread.lock". This is incorrect and conflicts with the value set in dummy_thread.

Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import thread
>>> import dummy_thread
>>> thread.LockType.__name__
>>> dummy_thread.LockType.__name__

Code which depends on the ability to look up a class based on module and name (see the following code taken from breaks due to this behavior, so my preferred fix would be to change tp_name to a value consistent with dummy_thread.

    mod = sys.modules[module]
    klass = getattr(mod, name)
except (ImportError, KeyError, AttributeError):
    raise PicklingError(
        "Can't pickle %r: it's not found as %s.%s" %
         (obj, module, name))

Happy to submit a patch if someone could confirm.
Date User Action Args
2015-01-28 06:02:27cindykrafftsetrecipients: + cindykrafft
2015-01-28 06:02:27cindykrafftsetmessageid: <>
2015-01-28 06:02:27cindykrafftlinkissue23336 messages
2015-01-28 06:02:26cindykrafftcreate