Message8042
Thread identifier seems to be missing:
C:\jython2.7b1\bin>jython
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading.currentThread().ident
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_MainThread' object has no attribute 'ident'
This breaks Twisted 13.0 (already patched as described in http://twistedmatrix.com/trac/ticket/3413):
Traceback (most recent call last):
File "wstest", line 7, in <module>
sys.exit(
File "C:\jython2.7b1\Lib\site-packages\autobahntestsuite-0.5.4-py2.7.egg\autobahntestsuite\wstest.py", line 351, in run
reactor.run()
File "C:\jython2.7b1\Lib\site-packages\twisted-13.0.0-py2.7.egg\twisted\internet\base.py", line 1191, in run
self.startRunning(installSignalHandlers=installSignalHandlers)
File "C:\jython2.7b1\Lib\site-packages\twisted-13.0.0-py2.7.egg\twisted\internet\base.py", line 1171, in startRunning
ReactorBase.startRunning(self)
File "C:\jython2.7b1\Lib\site-packages\twisted-13.0.0-py2.7.egg\twisted\internet\base.py", line 687, in startRunning
threadable.registerAsIOThread()
File "C:\jython2.7b1\Lib\site-packages\twisted-13.0.0-py2.7.egg\twisted\python\threadable.py", line 122, in registerAsIOThread
ioThread = getThreadID()
File "C:\jython2.7b1\Lib\site-packages\twisted-13.0.0-py2.7.egg\twisted\python\threadable.py", line 107, in getThreadID
return threadingmodule.currentThread().ident
AttributeError: '_MainThread' object has no attribute 'ident'
As a workaround, patch `twisted.python.threadable.py` for
_dummyID = object()
def getThreadID():
if threadingmodule is None:
return _dummyID
try:
# workaround for broken Jython
tid = threadingmodule.currentThread().ident
return tid
except AttributeError:
return _dummyID |
|
Date |
User |
Action |
Args |
2013-06-12 08:02:35 | oberstet | set | recipients:
+ oberstet |
2013-06-12 08:02:35 | oberstet | set | messageid: <1371024155.23.0.557886030514.issue2060@psf.upfronthosting.co.za> |
2013-06-12 08:02:34 | oberstet | link | issue2060 messages |
2013-06-12 08:02:34 | oberstet | create | |
|