Issue1554945
Created on 2006-09-08.19:37:24 by anonymous, last changed 2009-03-14.01:03:13 by fwierzbicki.
File name |
Uploaded |
Description |
Edit |
Remove |
jythonc.patch
|
nobody,
2006-09-08.19:37:24
|
Patch for jython 2.1 SimpleCompiler.py |
|
|
msg1222 (view) |
Author: Nobody/Anonymous (nobody) |
Date: 2006-09-08.19:37:24 |
|
Use of jythonc when code that includes asserts will
produce errors of the form:
as of release 1.4, 'assert' is a keyword, and may not
be used as an identifier
(try -source 1.3 or lower to use 'assert' as an identifier)
^
A short code that reproduces this problem is:
# more test.py
import thread, threading
print 'hello, world'
thread.exit()
# jythonc --all test.py
processing test
...
Compiling with args:
['/opt/sun-jdk-1.5.0.08/bin/javac', '-classpath',
'/usr/share/jython/lib/jython.jar:/usr/share/libreadline-java/lib/libreadline-java.jar:./jpywork::/usr/share/jython/tools/jythonc:/root/novelty/jython/server/.:/usr/share/jython/Lib',
'./jpywork/random.java', './jpywork/threading.java',
'./jpywork/sre_parse.java', './jpywork/copy.java',
'./jpywork/linecache.java', './jpywork/javaos.java',
'./jpywork/atexit.java', './jpywork/test.java',
'./jpywork/sre_constants.java',
'./jpywork/string.java', './jpywork/javapath.java',
'./jpywork/traceback.java', './jpywork/sre.java',
'./jpywork/StringIO.java', './jpywork/copy_reg.java',
'./jpywork/re.java', './jpywork/stat.java',
'./jpywork/UserDict.java',
'./jpywork/sre_compile.java', './jpywork/repr.java']
1 ./jpywork/threading.java:561: as of release 1.4,
'assert' is a keyword, and may not be used as an identifier
(try -source 1.3 or lower to use 'assert' as an identifier)
if
(frame.getglobal("__debug__").__nonzero__())
Py.assert(frame.getlocal(0).__getattr__("__RLock__owner")._is(frame.getlocal(2)),
s$8);
^
./jpywork/threading.java:705: as of release 1.4,
'assert' is a keyword, and may not be used as an identifier
(try -source 1.3 or lower to use 'assert' as an identifier)
if
(frame.getglobal("__debug__").__nonzero__()) Py
This error does not seem to have been reported before,
although a similar problem was reported fixed for the
jython compilation itself.
I was able to fix the problem by renaming assert to
assert_ in SimpleCompiler.py. The patch is attached.
|
msg4273 (view) |
Author: Frank Wierzbicki (fwierzbicki) |
Date: 2009-03-14.01:03:13 |
|
jythonc is no longer maintained.
|
|
Date |
User |
Action |
Args |
2009-03-14 01:03:13 | fwierzbicki | set | status: open -> closed resolution: wont fix messages:
+ msg4273 nosy:
+ fwierzbicki |
2006-09-08 19:37:24 | anonymous | create | |
|