Message234873
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__
'lock'
>>> dummy_thread.LockType.__name__
'LockType'
Code which depends on the ability to look up a class based on module and name (see the following code taken from pickle.py) breaks due to this behavior, so my preferred fix would be to change tp_name to a value consistent with dummy_thread.
try:
__import__(module)
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:27 | cindykrafft | set | recipients:
+ cindykrafft |
2015-01-28 06:02:27 | cindykrafft | set | messageid: <1422424947.14.0.409463431872.issue23336@psf.upfronthosting.co.za> |
2015-01-28 06:02:27 | cindykrafft | link | issue23336 messages |
2015-01-28 06:02:26 | cindykrafft | create | |
|