Issue1674
Created on 2010-11-03.11:24:25 by alex.gronholm, last changed 2010-11-09.22:57:50 by otmarhumbel.
msg6224 (view) |
Author: Alex Grönholm (alex.gronholm) |
Date: 2010-11-03.11:24:23 |
|
Trying a script with nothing but "from pdb import set_trace; set_trace()" through the Jython JSR-223 engine results in this:
>javax.script.ScriptException: TypeError: 'scope' object is not iterable in /home/alex/libs/jython2.5.2rc2/Lib/bdb.py at line number 52
at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:191)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:47)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at myscript.ScriptingTest.main(ScriptingTest.java:26)
Caused by: Traceback (most recent call last):
File "/home/alex/libs/jython2.5.2rc2/Lib/bdb.py", line 52, in trace_dispatch
return self.dispatch_return(frame, arg)
File "/home/alex/libs/jython2.5.2rc2/Lib/bdb.py", line 85, in dispatch_return
self.user_return(frame, arg)
File "/home/alex/libs/jython2.5.2rc2/Lib/pdb.py", line 170, in user_return
self.interaction(frame, None)
File "/home/alex/libs/jython2.5.2rc2/Lib/pdb.py", line 186, in interaction
self.print_stack_entry(self.stack[self.curindex])
File "/home/alex/libs/jython2.5.2rc2/Lib/pdb.py", line 827, in print_stack_entry
print >>self.stdout, self.format_stack_entry(frame_lineno,
File "/home/alex/libs/jython2.5.2rc2/Lib/bdb.py", line 335, in format_stack_entry
if '__args__' in frame.f_locals:
TypeError: 'scope' object is not iterable
|
msg6228 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2010-11-04.21:53:48 |
|
The JUnit test in 1674-test-patch.txt exposes the problem
|
msg6229 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2010-11-04.23:45:07 |
|
PyScriptEngineScope is not iterable, but emulates globals and locals.
If I make it iterable (by implementing __iter__()), the TypeError goes away
|
msg6230 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2010-11-06.00:12:49 |
|
The patch in file 1674-patch.txt makes the engine scope iterable and passes all regrtests locally
|
msg6243 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2010-11-09.22:57:50 |
|
fixed in revision 7169
|
|
Date |
User |
Action |
Args |
2010-11-09 22:57:50 | otmarhumbel | set | status: open -> closed resolution: fixed messages:
+ msg6243 |
2010-11-06 00:12:51 | otmarhumbel | set | files:
+ 1674-patch.txt assignee: otmarhumbel messages:
+ msg6230 |
2010-11-04 23:45:08 | otmarhumbel | set | files:
+ 1674-work-in-progress.txt messages:
+ msg6229 |
2010-11-04 21:53:49 | otmarhumbel | set | files:
+ 1674-test-patch.txt nosy:
+ otmarhumbel messages:
+ msg6228 |
2010-11-03 11:24:25 | alex.gronholm | create | |
|