Issue1279

classification
Title: dummy_threading broken
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: fwierzbicki, pjenvey, zyasoft
Priority: low Keywords:

Created on 2009-03-20.01:15:35 by pjenvey, last changed 2014-06-19.07:16:50 by zyasoft.

Messages
msg4315 (view) Author: Philip Jenvey (pjenvey) Date: 2009-03-20.01:15:34
test_dummy_threading fails

Traceback (most recent call last):
  File "dist/Lib/test/test_dummy_threading.py", line 7, in <module>
    import dummy_threading as _threading
  File "/Users/pjenvey/src/java/jython/dist/Lib/dummy_threading.py", 
line 50, in <module>
    import threading
  File "/Users/pjenvey/src/java/jython/dist/Lib/threading.py", line 6, 
in <module>
    from thread import _newFunctionThread
ImportError: cannot import name _newFunctionThread

this is due to the fact that our thread module has _newFunctionThread, 
but dummy_thread does not

Our threading module differs from CPython's so this may be a little more 
involved than it seems
msg4748 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-29.01:19:38
over to jim because technically he broke it with the new threading.py

Someone told us dummy_threading was actually needed for the GAE Python 
SDK. Otherwise we probably wouldn't/shouldn't care at all
msg6060 (view) Author: Jim Baker (zyasoft) Date: 2010-09-10.01:33:47
I suppose this is something we should still fix, even if App Engine doesn't seem to require it, there could be other circumstances where threading is not available.

The root of the problem is that threading.py is not designed to be imported when dummy threading is in place.
msg8736 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.07:16:50
Per docs:

This module provides a duplicate interface to the threading module. It is meant to be imported when the thread module is not provided on a platform.

Suggested usage is:

try:
    import threading as _threading
except ImportError:
    import dummy_threading as _threading

This has not come up as an issue other than by use core devs. Rewriting threading so it can be used by dummy_threading up to some ImportError doesn't make sense. Time to close out!
History
Date User Action Args
2014-06-19 07:16:50zyasoftsetstatus: open -> closed
resolution: wont fix
messages: + msg8736
2013-02-26 17:21:45fwierzbickisetnosy: + fwierzbicki
2010-09-10 01:33:48zyasoftsetmessages: + msg6060
2009-05-29 01:19:39pjenveysetassignee: zyasoft
messages: + msg4748
nosy: + zyasoft
2009-03-20 01:15:35pjenveycreate