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.
Created on 2015年01月28日 06:02 by cindykrafft, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg234873 - (view) | Author: (cindykrafft) | Date: 2015年01月28日 06:02 | |
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. |
|||
| msg235313 - (view) | Author: Josh Rosenberg (josh.r) * (Python triager) | Date: 2015年02月03日 03:16 | |
The thread and dummy_thread modules have a leading underscore in Py3.4, but the same naming issue is present there as well. |
|||
| msg391944 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2021年04月26日 15:41 | |
_dummy_thread and dummy_threading modules have been removed in V3.9. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67525 |
| 2021年04月26日 15:41:12 | iritkatriel | set | status: open -> closed nosy: + iritkatriel messages: + msg391944 resolution: out of date stage: resolved |
| 2015年02月03日 03:16:31 | josh.r | set | nosy:
+ josh.r messages: + msg235313 |
| 2015年01月28日 06:02:27 | cindykrafft | create | |