You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(107) |
Dec
(67) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(76) |
Feb
(125) |
Mar
(72) |
Apr
(13) |
May
(18) |
Jun
(12) |
Jul
(129) |
Aug
(47) |
Sep
(1) |
Oct
(36) |
Nov
(128) |
Dec
(124) |
2002 |
Jan
(59) |
Feb
|
Mar
(14) |
Apr
(14) |
May
(72) |
Jun
(9) |
Jul
(3) |
Aug
(5) |
Sep
(18) |
Oct
(65) |
Nov
(28) |
Dec
(12) |
2003 |
Jan
(10) |
Feb
(2) |
Mar
(4) |
Apr
(33) |
May
(21) |
Jun
(9) |
Jul
(29) |
Aug
(34) |
Sep
(4) |
Oct
(8) |
Nov
(15) |
Dec
(4) |
2004 |
Jan
(26) |
Feb
(12) |
Mar
(11) |
Apr
(9) |
May
(7) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(2) |
Feb
(72) |
Mar
(16) |
Apr
(39) |
May
(48) |
Jun
(97) |
Jul
(57) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(100) |
Dec
(24) |
2006 |
Jan
(15) |
Feb
(34) |
Mar
(33) |
Apr
(31) |
May
(79) |
Jun
(64) |
Jul
(41) |
Aug
(64) |
Sep
(31) |
Oct
(46) |
Nov
(55) |
Dec
(37) |
2007 |
Jan
(32) |
Feb
(61) |
Mar
(11) |
Apr
(58) |
May
(46) |
Jun
(30) |
Jul
(94) |
Aug
(93) |
Sep
(86) |
Oct
(69) |
Nov
(125) |
Dec
(177) |
2008 |
Jan
(169) |
Feb
(97) |
Mar
(74) |
Apr
(113) |
May
(120) |
Jun
(334) |
Jul
(215) |
Aug
(237) |
Sep
(72) |
Oct
(189) |
Nov
(126) |
Dec
(160) |
2009 |
Jan
(180) |
Feb
(45) |
Mar
(98) |
Apr
(140) |
May
(151) |
Jun
(71) |
Jul
(107) |
Aug
(119) |
Sep
(73) |
Oct
(121) |
Nov
(14) |
Dec
(6) |
2010 |
Jan
(13) |
Feb
(9) |
Mar
(10) |
Apr
(64) |
May
(3) |
Jun
(16) |
Jul
(7) |
Aug
(23) |
Sep
(17) |
Oct
(37) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(10) |
Feb
(11) |
Mar
(77) |
Apr
(11) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Finn B. <bc...@us...> - 2001-07-14 21:36:46
|
Update of /cvsroot/jython/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv23078 Modified Files: loginfo Log Message: Restore syncmail from bugtests. Index: loginfo =================================================================== RCS file: /cvsroot/jython/CVSROOT/loginfo,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** loginfo 2001/07/14 16:31:50 1.8 --- loginfo 2001/07/14 21:36:44 1.9 *************** *** 26,30 **** #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! jython /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... ! htdocs /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... ! CVSROOT /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... --- 26,28 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... |
From: Finn B. <bc...@us...> - 2001-07-14 21:35:16
|
Update of /cvsroot/jython/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv22909 Added Files: cvsignore Log Message: Inital version. --- NEW FILE --- *.class *.jar |
From: Finn B. <bc...@us...> - 2001-07-14 16:31:52
|
Update of /cvsroot/jython/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv10632 Modified Files: loginfo Log Message: Disable syncmail from bugtests. Just until I have committed the initial version. Index: loginfo =================================================================== RCS file: /cvsroot/jython/CVSROOT/loginfo,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** loginfo 2001/01/07 09:18:57 1.7 --- loginfo 2001/07/14 16:31:50 1.8 *************** *** 26,28 **** #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... --- 26,30 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! jython /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... ! htdocs /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... ! CVSROOT /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... |
From: Finn B. <bc...@us...> - 2001-07-14 16:22:47
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv9250 Added Files: driver.py support.py Log Message: Initial version. --- NEW FILE --- import sys, string, traceback, getopt, support, os failures = {} def reportError(): print n , "Failed!" if m and hasattr(m, "__doc__"): print m.__doc__.strip() print " ", sys.exc_info()[0] print " ", sys.exc_info()[1] failures[n] = 1 traceback.print_tb(sys.exc_info()[2]) opts, argv = getopt.getopt(sys.argv[1:], 'w') warnings = "-w" in opts for i in range(300): m = None n = "test%3.3d" % i try: stdout = sys.stdout if os.path.isfile(n + ".py"): m = __import__(n) sys.stdout = stdout print n, "OK!" else: print n, "Skipped" # except ImportError, e: # sys.stdout = stdout # if string.lower(str(e)[:20]) == "no module named test": # break # print n, str(e) except support.TestWarning: sys.stdout = stdout if warnings: reportError() else: print n, "Ok" except: sys.stdout = stdout reportError() t = failures.keys() t.sort() print print "%d tests failed" % len(t) print t sys.exit(1) --- NEW FILE --- import re, exceptions, thread, os, shutil class TestError(exceptions.Exception): def __init__(self, args): exceptions.Exception.__init__(self, args) class TestWarning(exceptions.Exception): def __init__(self, args): exceptions.Exception.__init__(self, args) def compare(s, pattern): m = re.search(pattern, str(s)) if m is None: raise TestError("string compare error\n " + str(s) + "\n " + pattern) def execCmd(cmd): #print cmd import java r = java.lang.Runtime.getRuntime() e = getattr(r, "exec") p = e(cmd) return p def compileJava(src, **kw): cmd = "javac " if kw.has_key("classpath"): cmd = cmd + "-classpath %s;%%CLASSPATH%% " % kw['classpath'] src = src.replace('/', '\\'); p = execCmd('cmd /C "%s %s"' % (cmd, src)) import java if kw.has_key("output"): outstream = java.io.FileOutputStream(kw['output']) else: outstream = java.lang.System.out import java thread.start_new_thread(StreamReader, (p.inputStream, outstream)) thread.start_new_thread(StreamReader, (p.errorStream, outstream)) ret = p.waitFor() if ret != 0: raise TestError, "%s failed with %d" % (cmd, ret) def runJava(cls, **kw): cmd = "java " if kw.has_key("classpath"): cmd = cmd + "-classpath %s;%%CLASSPATH%% " % kw['classpath'] p = execCmd('cmd /C "%s %s"' % (cmd, cls)) import java if kw.has_key("output"): outstream = java.io.FileOutputStream(kw['output']) else: outstream = java.lang.System.out import java thread.start_new_thread(StreamReader, (p.inputStream, outstream)) thread.start_new_thread(StreamReader, (p.errorStream, outstream)) ret = p.waitFor() if ret != 0: raise TestError, "%s failed with %d" % (cmd, ret) def StreamReader(instream, outstream): while 1: ch = instream.read() if ch == -1: break outstream.write(ch); def compileJPythonc(*files, **kw): if os.path.isdir("jpywork") and not kw.has_key("keep"): shutil.rmtree("jpywork", 1) import java if kw.has_key("output"): outstream = java.io.FileOutputStream(kw['output']) else: outstream = java.lang.System.out cmd = "jythonc " if kw.has_key("core"): cmd = cmd + "--core " if kw.has_key("deep"): cmd = cmd + "--deep " if kw.has_key("all"): cmd = cmd + "--all " if kw.has_key("package"): cmd = cmd + "--package %s " % kw['package'] if kw.has_key("jar"): cmd = cmd + "--jar %s " % kw['jar'] if os.path.isfile(kw['jar']): os.remove(kw['jar']) cmd = cmd + " ".join(files) p = execCmd('cmd /C "%s"' % cmd) import java thread.start_new_thread(StreamReader, (p.inputStream, outstream)) thread.start_new_thread(StreamReader, (p.errorStream, outstream)) ret = p.waitFor() if ret != 0 and not kw.has_key("expectError"): raise TestError, "%s failed with %d" % (cmd, ret) return ret def grep(file, text, count=0): f = open(file, "r") lines = f.readlines() f.close() result = [] for line in lines: if re.search(text, line): result.append(line) if count: return len(result) return result |
From: Finn B. <bc...@us...> - 2001-07-14 15:49:44
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv4270 Log Message: Initial module start. Status: Vendor Tag: dummy Release Tags: start No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Finn B. <bc...@us...> - 2001-07-09 20:35:14
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv30710 Modified Files: PySystemState.java Log Message: initRegistry(): Gracefully handle an empty prefix. The empty prefx can happen when jython.jar is located in cwd and is added to the CLASSPATH without a directory. The empty prefix would then cause the cachedir to be written in the root. yuck. Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.58 retrieving revision 2.59 diff -C2 -r2.58 -r2.59 *** PySystemState.java 2001/07/03 21:05:28 2.58 --- PySystemState.java 2001/07/09 20:35:11 2.59 *************** *** 290,293 **** --- 290,296 ---- // Load the default registry if (prefix != null) { + if (prefix.length() == 0) { + prefix = exec_prefix = "."; + } try { addRegistryFile(new File(prefix, "registry")); |
From: Finn B. <bc...@us...> - 2001-07-09 20:23:33
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory usw-pr-cvs1:/tmp/cvs-serv27039 Modified Files: ObjectFactory.py Log Message: PyClass.isSuperjavaclass(): Added fix for #439825 as a crude check for one level of innerclasses. Index: ObjectFactory.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/ObjectFactory.py,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** ObjectFactory.py 2001/06/30 01:03:13 2.9 --- ObjectFactory.py 2001/07/09 20:23:30 2.10 *************** *** 229,232 **** --- 229,238 ---- if hasattr(base, "name"): jc = compile.getJavaClass(base.name) + if jc is None: + idx = base.name.rfind('.') + if idx > 0: + #crude support for innerclasses. + name = base.name[:idx] + '$' + base.name[idx+1:] + jc = compile.getJavaClass(name) if jc is not None: self.javaclasses.append(jc) |
From: Finn B. <bc...@us...> - 2001-07-09 09:38:16
|
Update of /cvsroot/jython/jython/Demo/javaclasses/pygraph In directory usw-pr-cvs1:/tmp/cvs-serv502 Modified Files: PythonGraph.java Log Message: Added input textfield to match the __main__ code in Graph.py. Patch submitted by Durant Schoon. Index: PythonGraph.java =================================================================== RCS file: /cvsroot/jython/jython/Demo/javaclasses/pygraph/PythonGraph.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** PythonGraph.java 1999/05/27 21:00:32 1.2 --- PythonGraph.java 2001/07/09 09:38:12 1.3 *************** *** 4,17 **** import java.awt.event.*; ! public class PythonGraph { ! TextField expression; Graph graph; public PythonGraph() { Frame frame = new Frame("Python Graph"); ! graph = new Graph(); frame.add(graph, "Center"); ! graph.setExpression("sin(x)"); frame.addWindowListener(new WindowAdapter() { --- 4,23 ---- import java.awt.event.*; ! import javax.swing.JTextField; ! ! public class PythonGraph implements ActionListener { ! JTextField expression; Graph graph; public PythonGraph() { Frame frame = new Frame("Python Graph"); + String expr = "sin(x)"; ! graph = new Graph(expr); frame.add(graph, "Center"); ! ! expression = new JTextField(expr); ! frame.add(expression,"South"); ! expression.addActionListener(this); frame.addWindowListener(new WindowAdapter() { *************** *** 26,31 **** --- 32,42 ---- } + public void actionPerformed(ActionEvent evt) { + graph.setExpression(expression.getText()); + } + public static void main(String[] args) { PythonGraph pg = new PythonGraph(); } } + |
From: Finn B. <bc...@us...> - 2001-07-04 01:39:31
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv8196 Modified Files: Py.java Log Message: findClass(), findClassEX(): Fix a NPE when a securitymanager prevents the creation of classloaders. Reported here: http://www.geocrawler.com/lists/3/SourceForge/7017/50/5924674/ Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** Py.java 2001/06/22 18:55:56 2.45 --- Py.java 2001/07/03 20:20:27 2.46 *************** *** 577,581 **** secEnv=true; } ! return classLoader.loadClass(name); } --- 577,583 ---- secEnv=true; } ! if (classLoader != null) { ! return classLoader.loadClass(name); ! } } *************** *** 614,620 **** secEnv=true; } ! writeDebug("import", "trying " + name + " as " + reason + " in syspath loader"); ! return classLoader.loadClass(name); } --- 616,624 ---- secEnv=true; } ! if (classLoader != null) { ! writeDebug("import", "trying " + name + " as " + reason + " in syspath loader"); ! return classLoader.loadClass(name); ! } } |
From: Finn B. <bc...@us...> - 2001-07-04 01:39:11
|
Update of /cvsroot/jython/jython In directory usw-pr-cvs1:/tmp/cvs-serv20921 Modified Files: NEWS Log Message: Some new news. Index: NEWS =================================================================== RCS file: /cvsroot/jython/jython/NEWS,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** NEWS 2001/06/22 22:14:01 2.33 --- NEWS 2001/07/03 21:08:22 2.34 *************** *** 8,11 **** --- 8,16 ---- - Display Hook for Interactive Use (pep-0217) + Bug fixes. + - Fixed obscure __import__ error message #437800 + - Prevent a NPE during import when running with a security manager + - Fix a lost syntax error when auto importing submodules. + 14-mar-2001 Jython 2.1 alpha 1 |
From: Finn B. <bc...@us...> - 2001-07-04 01:39:02
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv18401 Modified Files: PyModule.java Log Message: impHook(): Fix a lost SyntaxError as reported here: http://www.geocrawler.com/archives/3/7018/2001/5/0/5814112/ Index: PyModule.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyModule.java,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** PyModule.java 2001/06/14 19:40:01 2.9 --- PyModule.java 2001/07/03 21:01:15 2.10 *************** *** 97,101 **** return __builtin__.__import__(name, null, null, silly_list); } catch(PyException e) { ! return null; } } --- 97,104 ---- return __builtin__.__import__(name, null, null, silly_list); } catch(PyException e) { ! if (Py.matchException(e, Py.ImportError)) { ! return null; ! } ! throw e; } } |
From: Finn B. <bc...@us...> - 2001-07-04 01:08:37
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv19380 Modified Files: PyString.java Log Message: Fix a regression bug when evaluating: >>> '%#o' % 0 00 Index: PyString.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyString.java,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** PyString.java 2001/05/31 18:16:55 2.44 --- PyString.java 2001/07/03 21:04:31 2.45 *************** *** 2149,2153 **** else { string = formatInteger(arg, 8, true); ! if (altFlag) { string = "0" + string; } --- 2149,2153 ---- else { string = formatInteger(arg, 8, true); ! if (altFlag && string.charAt(0) != '0') { string = "0" + string; } |
From: Finn B. <bc...@us...> - 2001-07-04 00:39:01
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv19926 Modified Files: PySystemState.java Log Message: Removed debugging output. Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -r2.57 -r2.58 *** PySystemState.java 2001/06/22 19:00:28 2.57 --- PySystemState.java 2001/07/03 21:05:28 2.58 *************** *** 176,180 **** __dict__ = new PyStringMap(); } - System.out.println("__setattr__#1 " + name + " " + value); __dict__.__setitem__(name, value); //throw Py.AttributeError(name); --- 176,179 ---- |
From: Finn B. <bc...@us...> - 2001-07-02 04:49:11
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv14524 Modified Files: __builtin__.java Log Message: __import__: Fix bug #437800. Index: __builtin__.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/__builtin__.java,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -r2.33 -r2.34 *** __builtin__.java 2001/05/27 18:49:15 2.33 --- __builtin__.java 2001/07/02 04:49:09 2.34 *************** *** 978,981 **** --- 978,983 ---- if (!(args.length < 1 || args[0] instanceof PyString)) throw Py.TypeError("first argument must be a string"); + if (keywords.length > 0) + throw Py.TypeError("__import__() takes no keyword arguments"); int argc = args.length; |
From: Samuele P. <ped...@us...> - 2001-06-30 01:03:16
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory usw-pr-cvs1:/tmp/cvs-serv29366 Modified Files: ObjectFactory.py compile.py proxies.py Log Message: jythonc fix for #222819; fix for #436730. Index: ObjectFactory.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/ObjectFactory.py,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** ObjectFactory.py 2001/05/27 18:50:56 2.8 --- ObjectFactory.py 2001/06/30 01:03:13 2.9 *************** *** 192,195 **** --- 192,213 ---- return jast.InvokeStatic("Py", "makeClass", args) + # proper logic for retrieving superproxy name + def _takeSupername(self,cls,mod,modname = None): + if modname is None: + modname = "" + if mod.package: modname = mod.package+'.' + modname += mod.name + self.javaclasses.extend(cls.javaclasses) + self.proxyname = self.name + self.supername = None + self.issuperproxy = 1 + full_py = modname + '.' + cls.name + if cls.name != mod.name: + self.pySupername = self.supername = full_py + else: + self.pySupername = full_py + self.supername = modname + self.supername = ':'+self.supername # ':' => Compiler will in case prefix this with opts.javapackage + def isSuperclassJava(self): if hasattr(self, 'javaclasses'): *************** *** 199,202 **** --- 217,221 ---- self.proxyname = None self.supername = None + self.pySupername = None self.issuperproxy = 0 import compile *************** *** 218,225 **** if isinstance(base, PyClass): if base.isSuperclassJava(): ! self.javaclasses.extend(base.javaclasses) ! self.proxyname = self.name ! self.supername = base.name ! self.issuperproxy = 1 continue if isinstance(base, PyNamespace): --- 237,241 ---- if isinstance(base, PyClass): if base.isSuperclassJava(): ! self._takeSupername(base,base.def_compiler.module) continue if isinstance(base, PyNamespace): *************** *** 232,241 **** if cls: if cls.value.isSuperclassJava(): ! self.javaclasses.extend(cls.value.javaclasses) ! self.proxyname = self.name ! self.supername = cls.value.name ! self.issuperproxy = 1 ! if cls.value.name != mod.name: ! self.supername = mod.name + '.' + self.supername continue --- 248,252 ---- if cls: if cls.value.isSuperclassJava(): ! self._takeSupername(cls.value,mod,modname = modname) continue Index: compile.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/compile.py,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** compile.py 2001/05/27 18:50:56 2.18 --- compile.py 2001/06/30 01:03:13 2.19 *************** *** 132,155 **** - def makeJavaProxy(module, pyc): - frame = pyc.frame - methods = [] - for name, func in frame.names.items(): - v = func.value - args = None - if hasattr(v, 'frame'): - args = v.frame.scope.ac - sig = None - if hasattr(v, 'doc'): - if name == "__init__": - sig = getsig(v.doc, args, constructor=1) - else: - sig = getsig(v.doc, args, constructor=0) - methods.append( (name, args, sig) ) - supername = None - if pyc.isSuperclassJava(): - return proxies.JavaProxy(pyc.name, pyc.supername, - pyc.javaclasses, methods, module, pyc.issuperproxy) - return None --- 132,135 ---- *************** *** 316,326 **** if prefixes.has_key(name): del self.packages[name] ! def processModule(self, mod, outdir): self.write(' %s module' % mod.name) proxyClasses = [] mainProxy = None for name, pyc in mod.classes.items(): ! proxy = makeJavaProxy(mod, pyc.value) if proxy is None: continue --- 296,330 ---- if prefixes.has_key(name): del self.packages[name] + + def makeJavaProxy(self, module, pyc): + frame = pyc.frame + methods = [] + for name, func in frame.names.items(): + v = func.value + args = None + if hasattr(v, 'frame'): + args = v.frame.scope.ac + sig = None + if hasattr(v, 'doc'): + if name == "__init__": + sig = getsig(v.doc, args, constructor=1) + else: + sig = getsig(v.doc, args, constructor=0) + methods.append( (name, args, sig) ) + if pyc.isSuperclassJava(): + supername, pySupername = pyc.supername, pyc.pySupername + if supername and supername[0] == ':': + supername = supername[1:] + if self.javapackage: supername = self.javapackage + '.' + supername + return proxies.JavaProxy(pyc.name, (supername, pySupername), + pyc.javaclasses, methods, module, pyc.issuperproxy) + return None ! def preprocessModule(self, mod): self.write(' %s module' % mod.name) proxyClasses = [] mainProxy = None for name, pyc in mod.classes.items(): ! proxy = self.makeJavaProxy(mod, pyc.value) if proxy is None: continue *************** *** 354,357 **** --- 358,362 ---- mod.specialClasses = specialClasses + def processModule(self,mod,outdir): self.javasources.append(mod.dump(outdir)) if self.options.bean is not None: *************** *** 385,390 **** for filename, mod in self.modules.items(): mod.modules = Compiler.allmodules ! self.processModule(mod, outdir) self.java2class(outdir) --- 390,400 ---- for filename, mod in self.modules.items(): mod.modules = Compiler.allmodules ! self.preprocessModule(mod) ! ! #self.write('\n...') + for filename, mod in self.modules.items(): + self.processModule(mod,outdir) + self.java2class(outdir) Index: proxies.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/proxies.py,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** proxies.py 2001/05/07 19:21:21 2.11 --- proxies.py 2001/06/30 01:03:13 2.12 *************** *** 117,121 **** self.bases = bases self.name = name ! self.supername = supername self.methods = methods self.issuperproxy = 0 #issuperproxy --- 117,121 ---- self.bases = bases self.name = name ! self.supername, self.pySupername = supername self.methods = methods self.issuperproxy = 0 #issuperproxy *************** *** 144,147 **** --- 144,148 ---- self.jmethods = {} + self.jabstract = {} self.supermethods = {} for base in bases: *************** *** 161,164 **** --- 162,211 ---- self.innerClasses = [] + # gather info about methods, and methods requiring a super__foo counterpart + self.superproxy = self + self.myCandSupermethods = [] + self.candSupermethods = None + self.methodsMemo = [] + self.prepMethods() + + def __repr__(self): return "<JavaProxy %s.%s>" % (self.modname,self.name) + + def getSuperproxy(self): + if self.superproxy is not self: + return self.superproxy + supername = self.pySupername + if supername is None: return None + modules = self.module.modules + parts = supername.split('.') + modname = '.'.join(parts[0:-1]) + dmodname = parts[-2] + supername = parts[-1] + superproxy = None + if modules.has_key(modname): + mod = modules[modname] + if dmodname == supername: + superproxy = getattr(mod,'javaproxy',None) + else: + for px in getattr(mod,'innerClasses',[]): + if isinstance(px,JavaProxy) and px.name == supername: + superproxy = px + break + self.superproxy = superproxy + return superproxy + + def getCandSupermethods(self,incl): + if incl and self.candSupermethods is not None: + return self.candSupermethods + px = self.getSuperproxy() + if px is not None: + cands = px.getCandSupermethods(incl = 1)[:] + else: + cands = [] + if incl: + cands.extend(self.myCandSupermethods) + self.candSupermethods = cands + return cands + + def dumpAll(self): self.statements = [] *************** *** 174,181 **** self.statements.append(ic) ! def dumpMethods(self): names = self.jmethods.keys() names.sort() ! #print 'adding methods', self.name, names pymethods = {} for name, args, sigs in self.methods: --- 221,228 ---- self.statements.append(ic) ! def prepMethods(self): names = self.jmethods.keys() names.sort() ! #print 'preparing adding methods', self.name, names pymethods = {} for name, args, sigs in self.methods: *************** *** 189,193 **** #print sigs for access, ret, sig, throws in sigs: ! self.callMethod(name, access, ret, sig, throws, 0) if self.jmethods.has_key(name): x = filter(lambda c: isinstance(c, TupleType), sig) --- 236,240 ---- #print sigs for access, ret, sig, throws in sigs: ! dosuper = 0 if self.jmethods.has_key(name): x = filter(lambda c: isinstance(c, TupleType), sig) *************** *** 195,199 **** --- 242,252 ---- if self.jmethods[name].has_key(x): del self.jmethods[name][x] + if not self.jabstract[name][x]: + dosuper = 1 + self.myCandSupermethods.append(name) + self.methodsMemo.append(('n',name, access, ret, sig, throws, + dosuper)) + for name in names: for sig, (access, ret, throws) in self.jmethods[name].items(): *************** *** 204,222 **** access = access & ~FINAL access = access & ~PROTECTED | PUBLIC ! self.callSuperMethod(name, "super__" + name, ! access, ret, sig, throws) continue elif isFinal(access): continue ! if isAbstract(access): access = access & ~PROTECTED | PUBLIC ! self.callMethod(name, access, ret, sig, throws, 0) elif pymethods.has_key(name): access = access & ~PROTECTED | PUBLIC ! self.callMethod(name, access, ret, sig, throws, 1) elif isProtected(access): access = access & ~PROTECTED | PUBLIC ! self.callSuperMethod(name, name, access, ret, sig, throws) def dumpConstructors(self): --- 257,284 ---- access = access & ~FINAL access = access & ~PROTECTED | PUBLIC ! self.methodsMemo.append(('s',name, "super__" + name, ! access, ret, sig, throws)) continue elif isFinal(access): continue ! if self.jabstract[name][sig]: #isAbstract(access): access = access & ~PROTECTED | PUBLIC ! self.methodsMemo.append(('n',name, access, ret, sig, throws, ! 0)) elif pymethods.has_key(name): access = access & ~PROTECTED | PUBLIC ! self.methodsMemo.append(('n',name, access, ret, sig, throws, ! 1)) ! self.myCandSupermethods.append(name) elif isProtected(access): access = access & ~PROTECTED | PUBLIC ! self.methodsMemo.append(('s',name, name, ! access, ret, sig, throws)) ! ! def dumpMethods(self): # use info gathered by prepMethods ! dispatch = { 's': self.callSuperMethod, 'n': self.callMethod } ! for m in self.methodsMemo: ! apply(dispatch[m[0]],m[1:]) def dumpConstructors(self): *************** *** 234,240 **** --- 296,304 ---- if len(value) == 0: del self.jmethods[name] + del self.jabstract[name] def addMethods(self, c): #print 'adding', c.__name__, c.getDeclaredMethods() + for method in c.getDeclaredMethods(): #Check that it's not already included *************** *** 244,253 **** mdict = aget(self.jmethods, name, {}) if mdict.has_key(sig): continue - access = method.modifiers - if isPrivate(access) or isStatic(access): continue --- 308,319 ---- mdict = aget(self.jmethods, name, {}) + absdict = aget(self.jabstract, name, {}) + + access = method.modifiers if mdict.has_key(sig): + if not isAbstract(access): absdict[sig] = 0 continue if isPrivate(access) or isStatic(access): continue *************** *** 266,269 **** --- 332,336 ---- throws = method.exceptionTypes mdict[sig] = access, ret, throws + absdict[sig] = isAbstract(access) sc = c.getSuperclass() *************** *** 364,368 **** supermethod = None ! if not self.issuperproxy: supermethod = jast.Method("super__"+name, jast.Modifier.ModifierString(access), --- 431,435 ---- supermethod = None ! if not self.issuperproxy and name not in self.getCandSupermethods(incl=0): supermethod = jast.Method("super__"+name, jast.Modifier.ModifierString(access), |
From: Samuele P. <ped...@us...> - 2001-06-30 01:01:31
|
Update of /cvsroot/jython/jython/org/python/compiler In directory usw-pr-cvs1:/tmp/cvs-serv29124 Modified Files: ProxyMaker.java Log Message: interpreter fix for #222819. Index: ProxyMaker.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/compiler/ProxyMaker.java,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** ProxyMaker.java 2001/03/22 20:04:22 2.12 --- ProxyMaker.java 2001/06/30 01:01:28 2.13 *************** *** 655,665 **** public void addSuperMethod(String methodName, String superName, ! String superclass, Class[] parameters, Class ret, String sig, int access) throws Exception { supernames.put(methodName, methodName); Code code = classfile.addMethod(methodName, sig, access); ! callSuper(code, superName, superclass, parameters, ret, sig); } --- 655,680 ---- public void addSuperMethod(String methodName, String superName, ! String declClass, Class[] parameters, Class ret, String sig, int access) throws Exception { + if (methodName.startsWith("super__")) { + /* rationale: JC java-class, P proxy-class subclassing JC + in order to avoid infinite recursion P should define super__foo + only if no class between P and JC in the hierarchy defines it yet; + this means that the python class needing P is the first that + redefines the JC method foo. + */ + try { + superclass.getMethod(methodName,parameters); + return; + } catch(NoSuchMethodException e) { + } catch(SecurityException e) { + return; + } + } supernames.put(methodName, methodName); Code code = classfile.addMethod(methodName, sig, access); ! callSuper(code, superName, declClass, parameters, ret, sig); } |
From: Samuele P. <ped...@us...> - 2001-06-27 13:47:30
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory usw-pr-cvs1:/tmp/cvs-serv27667 Modified Files: main.py Log Message: Fix duplicate errors producing jars when both --all and --core are specified. Note: --all takes over --core. Index: main.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/main.py,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** main.py 2000/11/17 12:44:21 2.12 --- main.py 2001/06/27 13:47:12 2.13 *************** *** 268,275 **** extraPackages = [] - if opts.core: - addCore(extraPackages) if opts.all: addAll(extraPackages) ja = JavaArchive(extraPackages) --- 268,275 ---- extraPackages = [] if opts.all: addAll(extraPackages) + elif opts.core: + addCore(extraPackages) ja = JavaArchive(extraPackages) |
From: Finn B. <bc...@us...> - 2001-06-22 22:14:16
|
Update of /cvsroot/jython/jython In directory usw-pr-cvs1:/tmp/cvs-serv11825 Modified Files: NEWS Log Message: Added ReadlineConsole and displayhook. Index: NEWS =================================================================== RCS file: /cvsroot/jython/jython/NEWS,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** NEWS 2001/03/22 21:36:57 2.32 --- NEWS 2001/06/22 22:14:01 2.33 *************** *** 1,9 **** Jython NEWS ! xx-apr-2001 Jython 2.1 alpha 2 ! Bug fixes. ! - Fix #222819, #231507 and #406193 all related to proxies and their ! super__ methods. 14-mar-2001 Jython 2.1 alpha 1 --- 1,10 ---- Jython NEWS ! xx-jun-2001 Jython 2.1 alpha 2 ! New features. ! - Added ReadlineConsole class. This class will make it a lot easier ! to integrate Bablok's readline support. ! - Display Hook for Interactive Use (pep-0217) 14-mar-2001 Jython 2.1 alpha 1 *************** *** 33,37 **** - Include a LineNumberTable in the compiled class files. - Fixed a java version test bug in the installer. ! - Added workaround for class initializarion bug in MRJ2.2.4 17-Jan-2001 Jython 2.0 final release --- 34,39 ---- - Include a LineNumberTable in the compiled class files. - Fixed a java version test bug in the installer. ! - Added workaround for class initialization bug in MRJ2.2.4 ! - Added support for three argument getattr() calls. 17-Jan-2001 Jython 2.0 final release |
From: Finn B. <bc...@us...> - 2001-06-22 19:00:32
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv19128 Modified Files: PySystemState.java Log Message: Updated version number to 2.1a2. Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.56 retrieving revision 2.57 diff -C2 -r2.56 -r2.57 *** PySystemState.java 2001/06/22 18:55:56 2.56 --- PySystemState.java 2001/06/22 19:00:28 2.57 *************** *** 18,22 **** * The current version of JPython. */ ! public static String version = "2.1a1"; private static int PY_MAJOR_VERSION = 2; --- 18,22 ---- * The current version of JPython. */ ! public static String version = "2.1a2"; private static int PY_MAJOR_VERSION = 2; *************** *** 24,28 **** private static int PY_MICRO_VERSION = 0; private static int PY_RELEASE_LEVEL = 0xA; ! private static int PY_RELEASE_SERIAL = 1; public static int hexversion = ((PY_MAJOR_VERSION << 24) | --- 24,28 ---- private static int PY_MICRO_VERSION = 0; private static int PY_RELEASE_LEVEL = 0xA; ! private static int PY_RELEASE_SERIAL = 2; public static int hexversion = ((PY_MAJOR_VERSION << 24) | |
From: Finn B. <bc...@us...> - 2001-06-22 18:56:01
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv16726 Modified Files: Py.java PySystemState.java Log Message: Support for the displayhook feature (PEP#217). Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** Py.java 2001/05/27 18:49:15 2.44 --- Py.java 2001/06/22 18:55:56 2.45 *************** *** 1559,1567 **** public static void printResult(PyObject ret) { ! if (ret != Py.None) { ! Py.getSystemState().builtins.__setitem__("_", Py.None); ! Py.println(ret.__repr__()); ! Py.getSystemState().builtins.__setitem__("_", ret); ! } } --- 1559,1564 ---- public static void printResult(PyObject ret) { ! Py.getThreadState().systemState.invoke("displayhook", ret); ! //Py.getThreadState().systemState.__dict__.__finditem__("displayhook").__call__(ret); } Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.55 retrieving revision 2.56 diff -C2 -r2.55 -r2.56 *** PySystemState.java 2001/04/13 18:32:55 2.55 --- PySystemState.java 2001/06/22 18:55:56 2.56 *************** *** 176,179 **** --- 176,180 ---- __dict__ = new PyStringMap(); } + System.out.println("__setattr__#1 " + name + " " + value); __dict__.__setitem__(name, value); //throw Py.AttributeError(name); *************** *** 217,220 **** --- 218,223 ---- __dict__ = new PyStringMap(); __dict__.invoke("update", __class__.__getattr__("__dict__")); + __dict__.__setitem__("displayhook", + new PySystemStateFunctions("displayhook", 10, 1, 1)); } } *************** *** 607,610 **** --- 610,630 ---- codecs.setDefaultEncoding(encoding); } + + + // Not public by design. We can't rebind the displayhook if + // a reflected function is inserted in the class dict. + + static void displayhook(PyObject o) { + /* Print value except if None */ + /* After printing, also assign to '_' */ + /* Before, set '_' to None to avoid recursion */ + if (o == Py.None) + return; + + PySystemState sys = Py.getThreadState().systemState; + sys.builtins.__setitem__("_", Py.None); + Py.stdout.println(o.__repr__()); + sys.builtins.__setitem__("_", o); + } } *************** *** 636,639 **** --- 656,678 ---- waitForBytes(); return super.read(b, off, len); + } + } + + + class PySystemStateFunctions extends PyBuiltinFunctionSet + { + PySystemStateFunctions(String name, int index, int minargs, int maxargs) { + super(name, index, minargs, maxargs, false, null); + } + + public PyObject __call__(PyObject arg) { + PySystemState sys = Py.getThreadState().systemState; + switch (index) { + case 10: + sys.displayhook(arg); + return Py.None; + default: + throw argCountError(1); + } } } |
From: Finn B. <bc...@us...> - 2001-06-20 20:25:59
|
Update of /cvsroot/jython/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv18860 Modified Files: users.ht Log Message: Added FamilyRelations. Index: users.ht =================================================================== RCS file: /cvsroot/jython/htdocs/users.ht,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** users.ht 2001/05/07 19:29:53 1.5 --- users.ht 2001/06/20 20:25:55 1.6 *************** *** 20,22 **** --- 20,26 ---- school lessons. Jython is used as the scripting language. + <p><dt><b><a href="http://family.caltech.edu">FamilyRelations</a></b> + <dd>FamilyRelations is a GPLed bioinformatics graphical user interface for + exploring genomic sequence similarity. It is written entirely in Jython. + </dl> |
From: Samuele P. <ped...@us...> - 2001-06-14 19:40:04
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv24472 Modified Files: PyModule.java imp.java Log Message: fix for [ #415933 ] dependency problem with jythonc. Oddly enough, it was a core problem: at some point the None used as mark in sys.modules to speed-dup relative imports, were blindly returned by imports instead of raising proper import errors. Index: PyModule.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyModule.java,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** PyModule.java 2001/02/02 09:28:37 2.8 --- PyModule.java 2001/06/14 19:40:01 2.9 *************** *** 27,31 **** PyObject ret = modules.__finditem__(fullName); ! if (ret != null) return ret; if (path == Py.None) { --- 27,32 ---- PyObject ret = modules.__finditem__(fullName); ! if (ret == Py.None) ret = null; ! else if (ret != null) return ret; if (path == Py.None) { Index: imp.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/imp.java,v retrieving revision 2.45 retrieving revision 2.46 diff -C2 -r2.45 -r2.46 *** imp.java 2001/06/13 20:44:33 2.45 --- imp.java 2001/06/14 19:40:01 2.46 *************** *** 452,457 **** PyObject modules = Py.getSystemState().modules; PyObject mod = modules.__finditem__(name); ! if (mod != null && !top) ! return mod; int last_dot = dot; --- 452,457 ---- PyObject modules = Py.getSystemState().modules; PyObject mod = modules.__finditem__(name); ! if (mod == Py.None) mod = null; ! else if (mod != null && !top) return mod; int last_dot = dot; *************** *** 505,509 **** String newName = (pkgName+'.'+name).intern(); mod = modules.__finditem__(newName); ! if (mod != null) { //System.err.println("refound: "+name); // ?? dbg if (!top) return mod; --- 505,509 ---- String newName = (pkgName+'.'+name).intern(); mod = modules.__finditem__(newName); ! if (mod != null && mod != Py.None) { //System.err.println("refound: "+name); // ?? dbg if (!top) return mod; |
From: Samuele P. <ped...@us...> - 2001-06-13 20:44:36
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv14179 Modified Files: PyJavaPackage.java imp.java Log Message: Reverted to old semantic: from jpkg import * will filter out _foo named classes too. Rationale: the change broke the python guarantee (up to bad __all__ attr) that from import * will never clash with something named like _bar. from import * for a java_pkg is not production code stuff and the feature of getting _foo classes (rare beasts) too isn't important at all. Index: PyJavaPackage.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyJavaPackage.java,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -r2.12 -r2.13 *** PyJavaPackage.java 2001/06/07 20:11:54 2.12 --- PyJavaPackage.java 2001/06/13 20:44:33 2.13 *************** *** 56,60 **** __dict__ = new PyStringMap(); ! // __dict__.__setitem__("__name__", new PyString(__name__)); ?? } --- 56,60 ---- __dict__ = new PyStringMap(); ! __dict__.__setitem__("__name__", new PyString(__name__)); } Index: imp.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/imp.java,v retrieving revision 2.44 retrieving revision 2.45 diff -C2 -r2.44 -r2.45 *** imp.java 2001/06/04 10:42:59 2.44 --- imp.java 2001/06/13 20:44:33 2.45 *************** *** 626,639 **** getStarArg()); PyObject names; ! boolean filter = false; if (module instanceof PyJavaPackage) names = ((PyJavaPackage)module).fillDir(); else { PyObject __all__ = module.__findattr__("__all__"); ! if (__all__ != null) names = __all__; ! else { ! names = module.__dir__(); ! filter = true; ! } } --- 626,638 ---- getStarArg()); PyObject names; ! boolean filter = true; if (module instanceof PyJavaPackage) names = ((PyJavaPackage)module).fillDir(); else { PyObject __all__ = module.__findattr__("__all__"); ! if (__all__ != null) { ! names = __all__; ! filter = false; ! } else names = module.__dir__(); } |
From: Samuele P. <ped...@us...> - 2001-06-07 20:11:57
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv18807 Modified Files: PyJavaPackage.java Log Message: [Finn] >Update of /cvsroot/jython/jython/org/python/core >In directory usw-pr-cvs1:/tmp/cvs-serv11143 > >Modified Files: > imp.java >Log Message: >fix for bug #426023 from import *: ign __ vs. _ and __all__ . I think this is a semantic change which causes problems for jythonc. Type "copyright", "credits" or "license" for more information. >>> __name__ '__main__' >>> from java.lang import * >>> __name__ 'java.lang' >>> Trying to fix that this way: from jpkg import * will still use the new (better?) semantic importing _jclass too, OTOH __name__ is no longer in jpkg.__dict__ but just an attr. -- sP Index: PyJavaPackage.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyJavaPackage.java,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** PyJavaPackage.java 2001/03/04 18:11:31 2.11 --- PyJavaPackage.java 2001/06/07 20:11:54 2.12 *************** *** 56,60 **** __dict__ = new PyStringMap(); ! __dict__.__setitem__("__name__", new PyString(__name__)); } --- 56,60 ---- __dict__ = new PyStringMap(); ! // __dict__.__setitem__("__name__", new PyString(__name__)); ?? } |
From: Finn B. <bc...@us...> - 2001-06-04 10:52:24
|
Update of /cvsroot/jython/jython In directory usw-pr-cvs1:/tmp/cvs-serv29357 Modified Files: registry Log Message: Support for case sensitive imports on case-ignoring filesystem (like windows). Index: registry =================================================================== RCS file: /cvsroot/jython/jython/registry,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** registry 2001/05/28 16:56:37 2.13 --- registry 2001/06/04 10:43:32 2.14 *************** *** 56,59 **** --- 56,67 ---- #python.options.internalTablesImpl = weak + # Setting this to true will force Jython will use the first module + # found on sys.path where java File.isFile() returns true. + # Setting this to true has no effect on unix-type filesystems. + # On Windows/HPS+ systems, setting it to true will enable Jython-2.0 + # behaviour. + python.options.caseok = false + + # Use this registry entry to control the list of builtin modules; you # can add, remove, or override builtin modules. The value for this |