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-12-20 18:27:49
|
Update of /cvsroot/jython/jython/installer In directory usw-pr-cvs1:/tmp/cvs-serv13328 Modified Files: liftoff.filelist Log Message: Some new files. Index: liftoff.filelist =================================================================== RCS file: /cvsroot/jython/jython/installer/liftoff.filelist,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** liftoff.filelist 2001/12/03 20:17:37 1.25 --- liftoff.filelist 2001/12/20 18:27:47 1.26 *************** *** 347,350 **** --- 347,351 ---- t org/python/core/PyModule.java ..\org\python\core\PyModule.java t org/python/core/PyNone.java ..\org\python\core\PyNone.java + t org/python/core/PyNotImplemented.java ..\org\python\core\PyNotImplemented.java t org/python/core/PyObject.java ..\org\python\core\PyObject.java t org/python/core/PyProxy.java ..\org\python\core\PyProxy.java *************** *** 452,458 **** --- 453,461 ---- t Lib/jxxload_help/PathVFSJavaLoader.java ..\Lib\jxxload_help\PathVFSJavaLoader.java t com/ziclix/python/sql/DataHandler.java ..\com\ziclix\python\sql\DataHandler.java + t com/ziclix/python/sql/DBApiType.java ..\com\ziclix\python\sql\DBApiType.java t com/ziclix/python/sql/Fetch.java ..\com\ziclix\python\sql\Fetch.java t com/ziclix/python/sql/FilterDataHandler.java ..\com\ziclix\python\sql\FilterDataHandler.java t com/ziclix/python/sql/JDBC20DataHandler.java ..\com\ziclix\python\sql\JDBC20DataHandler.java + t com/ziclix/python/sql/Procedure.java ..\com\ziclix\python\sql\Procedure.java t com/ziclix/python/sql/PyConnection.java ..\com\ziclix\python\sql\PyConnection.java t com/ziclix/python/sql/PyCursor.java ..\com\ziclix\python\sql\PyCursor.java |
From: Finn B. <bc...@us...> - 2001-12-20 18:22:40
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv11889 Modified Files: PyServlet.java Log Message: Remove the requirement that source files have a .py suffix. That is done better with a "<url-pattern>*.py</url-pattern>" anyway. Index: PyServlet.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/PyServlet.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PyServlet.java 2001/12/20 18:19:58 1.15 --- PyServlet.java 2001/12/20 18:22:36 1.16 *************** *** 179,183 **** else start++; ! int end = path.lastIndexOf(".py"); if ((end < 0) || (end <= start)) end = path.length(); --- 179,183 ---- else start++; ! int end = path.lastIndexOf('.'); if ((end < 0) || (end <= start)) end = path.length(); |
From: Finn B. <bc...@us...> - 2001-12-20 18:20:00
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv11309 Modified Files: PyServlet.java Log Message: Add context parameters to the initialization properties. Context parameters will be overriden by servlet parameters. Index: PyServlet.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/PyServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PyServlet.java 2001/12/06 19:29:30 1.14 --- PyServlet.java 2001/12/20 18:19:58 1.15 *************** *** 72,80 **** Properties props = new Properties(); ! Enumeration e = getInitParameterNames(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); props.put(name, getInitParameter(name)); } if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { --- 72,91 ---- Properties props = new Properties(); ! ! // Context parameters ! ServletContext context = getServletContext(); ! Enumeration e = context.getInitParameterNames(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); + props.put(name, context.getInitParameter(name)); + } + + // Config parameters + e = getInitParameterNames(); + while (e.hasMoreElements()) { + String name = (String) e.nextElement(); props.put(name, getInitParameter(name)); } + if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { |
From: Finn B. <bc...@us...> - 2001-12-20 17:41:33
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv30000 Modified Files: PySystemState.java Log Message: Disable the "trying to reinitialize with new properties" warning. Maybe we should have a way of controlling this warning, but for now, I simply remove it. Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.71 retrieving revision 2.72 diff -C2 -d -r2.71 -r2.72 *** PySystemState.java 2001/12/16 13:04:02 2.71 --- PySystemState.java 2001/12/20 17:41:30 2.72 *************** *** 359,366 **** if (initialized) { ! if (postProperties != null) { ! Py.writeError("systemState", ! "trying to reinitialize with new properties"); ! } return; } --- 359,367 ---- if (initialized) { ! //if (postProperties != null) { ! // Py.writeError("systemState", ! // "trying to reinitialize with new " + ! // "properties"); ! //} return; } |
From: Finn B. <bc...@us...> - 2001-12-20 17:19:08
|
Update of /cvsroot/jython/jython/org/python/parser In directory usw-pr-cvs1:/tmp/cvs-serv25241 Modified Files: PythonGrammar.java PythonGrammarTokenManager.java Log Message: Comitting generated files. Index: PythonGrammar.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/PythonGrammar.java,v retrieving revision 2.14 retrieving revision 2.15 diff -C2 -d -r2.14 -r2.15 *** PythonGrammar.java 2001/10/30 20:37:33 2.14 --- PythonGrammar.java 2001/12/20 17:19:03 2.15 *************** *** 5463,5474 **** } - final private boolean jj_3_20() { - if (jj_scan_token(COMMA)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - if (jj_3R_40()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - final private boolean jj_3_19() { if (jj_scan_token(COMMA)) return true; --- 5463,5466 ---- *************** *** 6595,6598 **** --- 6587,6598 ---- final private boolean jj_3_21() { if (jj_3R_44()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + final private boolean jj_3_20() { + if (jj_scan_token(COMMA)) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_40()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; Index: PythonGrammarTokenManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/PythonGrammarTokenManager.java,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -d -r2.13 -r2.14 *** PythonGrammarTokenManager.java 2001/10/30 20:37:33 2.13 --- PythonGrammarTokenManager.java 2001/12/20 17:19:06 2.14 *************** *** 2770,2774 **** else image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); ! indent = 0; break; default : --- 2770,2778 ---- else image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); ! indent = 0; ! if (indent == indentation[level]) ! SwitchTo(INDENTATION_UNCHANGED); ! else ! SwitchTo(INDENTING); break; default : |
From: Finn B. <bc...@us...> - 2001-12-20 17:15:04
|
Update of /cvsroot/jython/jython/org/python/parser In directory usw-pr-cvs1:/tmp/cvs-serv22871 Modified Files: python.jjt Log Message: Fix a bug introduced in version 2.16. This restores the handling performed after a SINGLE_LINE_COMMENT. Fixes bug "[ #489168 ] Parse error, java traceback". Index: python.jjt =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/python.jjt,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -d -r2.16 -r2.17 *** python.jjt 2001/10/30 20:30:10 2.16 --- python.jjt 2001/12/20 17:15:01 2.17 *************** *** 218,223 **** <INDENTING, INDENTATION_UNCHANGED> SPECIAL_TOKEN: /* COMMENTS */ { ! <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* ("\r\n" | "\n" | "\r")> ! { indent = 0; } } --- 218,228 ---- <INDENTING, INDENTATION_UNCHANGED> SPECIAL_TOKEN: /* COMMENTS */ { ! <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* ("\r\n" | "\n" | "\r")> { ! indent = 0; ! if (indent == indentation[level]) ! SwitchTo(INDENTATION_UNCHANGED); ! else ! SwitchTo(INDENTING); ! } } |
From: Finn B. <bc...@us...> - 2001-12-20 16:46:10
|
Update of /cvsroot/jython/jython In directory usw-pr-cvs1:/tmp/cvs-serv14732 Modified Files: ACKNOWLEDGMENTS Log Message: Matt Conway for patch to "[ #495458 ] multi level import from .zip file" Index: ACKNOWLEDGMENTS =================================================================== RCS file: /cvsroot/jython/jython/ACKNOWLEDGMENTS,v retrieving revision 2.17 retrieving revision 2.18 diff -C2 -d -r2.17 -r2.18 *** ACKNOWLEDGMENTS 2001/12/03 19:45:52 2.17 --- ACKNOWLEDGMENTS 2001/12/20 16:46:07 2.18 *************** *** 53,56 **** --- 53,57 ---- Michael Becke Randy Jay Yarger + Matt Conway Local Variables: |
From: Finn B. <bc...@us...> - 2001-12-20 16:44:11
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv13523 Modified Files: imp.java Log Message: Use the relative module name when adding a subdir zip archive. This fixes "[ #495458 ] multi level import from .zip file". Index: imp.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/imp.java,v retrieving revision 2.57 retrieving revision 2.58 diff -C2 -d -r2.57 -r2.58 *** imp.java 2001/11/27 19:07:21 2.57 --- imp.java 2001/12/20 16:44:06 2.58 *************** *** 299,303 **** PyModule m = addModule(modName); ! SyspathArchive subArchive = zipArchive.makeSubfolder(modName); PyList zipPath = new PyList(new PyObject[] { subArchive }); m.__dict__.__setitem__("__path__", zipPath); --- 299,303 ---- PyModule m = addModule(modName); ! SyspathArchive subArchive = zipArchive.makeSubfolder(name); PyList zipPath = new PyList(new PyObject[] { subArchive }); m.__dict__.__setitem__("__path__", zipPath); |
From: Finn B. <bc...@us...> - 2001-12-20 16:41:45
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv13062 Modified Files: driver.py Log Message: Dump the test counter. Index: driver.py =================================================================== RCS file: /cvsroot/jython/bugtests/driver.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** driver.py 2001/11/21 11:11:39 1.6 --- driver.py 2001/12/20 16:41:42 1.7 *************** *** 17,21 **** warnings = "-w" in opts ! for i in range(350): m = None n = "test%3.3d" % i --- 17,21 ---- warnings = "-w" in opts ! for i in range(360): m = None n = "test%3.3d" % i |
From: Finn B. <bc...@us...> - 2001-12-20 16:41:07
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv12883 Added Files: test350.py Log Message: Test for "[ #495458 ] multi level import from .zip file" --- NEW FILE: test350.py --- """ [ #495458 ] multi level import from .zip file """ import support import zipfile, time def addZipEntry(zip, name, data): entry = zipfile.ZipInfo() entry.filename = name entry.date_time = time.gmtime(time.time()) zip.writestr(entry, data) zip = zipfile.ZipFile("test350.zip", "w") addZipEntry(zip, "Lib/aaa/__init__.py", "") addZipEntry(zip, "Lib/aaa/bbb/__init__.py", "") addZipEntry(zip, "Lib/aaa/bbb/ccc/__init__.py", "") addZipEntry(zip, "Lib/aaa/bbb/ccc/yyy.py", "") addZipEntry(zip, "Lib/aaa/bbb/xxx.py", "") zip.close() import sys sys.path.append("test350.zip/Lib") import aaa import aaa.bbb import aaa.bbb.ccc import aaa.bbb.ccc.yyy import aaa.bbb.xxx sys.path.pop() |
From: Finn B. <bc...@us...> - 2001-12-19 19:07:59
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv15793 Added Files: test351.py Log Message: Test for "[ #489168 ] Parse error, java traceback" --- NEW FILE: test351.py --- """ [ #489168 ] Parse error, java traceback """ import support a = 1 # indented comment a = 2 |
From: Finn B. <bc...@us...> - 2001-12-18 12:52:07
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv4912 Modified Files: PyFinalizableInstance.java Log Message: Print a message if the __del__() throws a exception. This closes bug "[ #494514 ] Python object not gc()'d". Index: PyFinalizableInstance.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyFinalizableInstance.java,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -d -r2.4 -r2.5 *** PyFinalizableInstance.java 2001/10/28 17:13:43 2.4 --- PyFinalizableInstance.java 2001/12/18 12:52:04 2.5 *************** *** 22,26 **** // __del__ method is invoked upon object finalization. protected void finalize() { ! __class__.__del__.__call__(this); } } --- 22,39 ---- // __del__ method is invoked upon object finalization. protected void finalize() { ! try { ! __class__.__del__.__call__(this); ! } catch (PyException exc) { ! // Try to get the right method description. ! PyObject method = __class__.__del__; ! try { ! method = __findattr__("__del__"); ! } catch (PyException e) { ; } ! ! Py.stderr.println("Exception " + ! Py.formatException(exc.type, exc.value, exc.traceback) + ! " in " + method + ! " ignored"); ! } } } |
From: Finn B. <bc...@us...> - 2001-12-18 12:50:30
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv4197 Modified Files: Py.java Log Message: Added formatException(..). To be used from PyFinalizableInstance.finalize() Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.61 retrieving revision 2.62 diff -C2 -d -r2.61 -r2.62 *** Py.java 2001/12/16 13:04:02 2.61 --- Py.java 2001/12/18 12:50:27 2.62 *************** *** 962,984 **** } } PyObject typeName; if (type instanceof PyClass) { ! typeName = new PyString(((PyClass)type).__name__); } else { ! typeName = type; } if (value != Py.None) { ! stderr.print(typeName); ! stderr.print(": "); if (__builtin__.isinstance(value, (PyClass) Py.SyntaxError)) { ! stderr.println(value.__getitem__(0)); } else { ! stderr.println(value); } - } else { - stderr.println(typeName); } } /* Equivalent to Python's assert statement */ --- 962,988 ---- } } + stderr.println(formatException(type, value, tb)); + } + + static String formatException(PyObject type, PyObject value, PyObject tb) { + StringBuffer buf = new StringBuffer(); PyObject typeName; if (type instanceof PyClass) { ! buf.append(((PyClass) type).__name__); } else { ! buf.append(type.__str__()); } if (value != Py.None) { ! buf.append(": "); if (__builtin__.isinstance(value, (PyClass) Py.SyntaxError)) { ! buf.append(value.__getitem__(0).__str__()); } else { ! buf.append(value.__str__()); } } + return buf.toString(); } + /* Equivalent to Python's assert statement */ |
From: Finn B. <bc...@us...> - 2001-12-18 12:44:59
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv3478 Added Files: test349.py Log Message: Test for "[ #494514 ] Python object not gc()'d". --- NEW FILE: test349.py --- """ [ #494514 ] Python object not gc()'d """ import support import java, time, sys, cStringIO class A: def __del__(self): raise KeyError, "dummy" try: sys.stderr = cStringIO.StringIO() A() java.lang.System.gc() time.sleep(2) finally: v = sys.stderr.getvalue() sys.stderr = sys.__stderr__ support.compare(v, "Exception KeyError: .* ignored") |
From: Finn B. <bc...@us...> - 2001-12-17 11:29:55
|
Update of /cvsroot/jython/jython/org/python/modules In directory usw-pr-cvs1:/tmp/cvs-serv7035 Modified Files: MD5Object.java md.java Log Message: Eliminate a warning when compiling with jikes. Index: MD5Object.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/modules/MD5Object.java,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -d -r2.5 -r2.6 *** MD5Object.java 2001/10/28 17:13:44 2.5 --- MD5Object.java 2001/12/17 11:29:51 2.6 *************** *** 33,37 **** public PyObject digest() { ! md5 md5obj = new md5(data); md5obj.calc(); // this is for compatibility with CPython's output --- 33,37 ---- public PyObject digest() { ! md md5obj = md.new_md5(data); md5obj.calc(); // this is for compatibility with CPython's output *************** *** 47,51 **** public PyObject hexdigest() { ! md5 md5obj = new md5(data); md5obj.calc(); // this is for compatibility with CPython's output --- 47,51 ---- public PyObject hexdigest() { ! md md5obj = md.new_md5(data); md5obj.calc(); // this is for compatibility with CPython's output Index: md.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/modules/md.java,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -d -r2.3 -r2.4 *** md.java 2001/02/02 11:29:42 2.3 --- md.java 2001/12/17 11:29:51 2.4 *************** *** 409,412 **** --- 409,415 ---- return tmpstr; } + static md new_md5(String data) { + return new md5(data); + } } |
From: Finn B. <bc...@us...> - 2001-12-17 10:25:28
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv27365 Added Files: PyNotImplemented.java Log Message: Initial version. --- NEW FILE: PyNotImplemented.java --- package org.python.core; public class PyNotImplemented extends PySingleton { PyNotImplemented() { super("NotImplemented"); } public boolean __nonzero__() { return false; } public Object __tojava__(Class c) { //Danger here. java.lang.Object gets null not None if (c == PyObject.class) return this; if (c.isPrimitive()) return Py.NoConversion; return null; } public String safeRepr() throws PyIgnoreMethodTag { return "NotImplemented"; } public boolean isMappingType() { return false; } public boolean isSequenceType() { return false; } // __class__ boilerplate -- see PyObject for details public static PyClass __class__; protected PyClass getPyClass() { return __class__; } } |
From: brian z. <bz...@us...> - 2001-12-17 03:45:41
|
Update of /cvsroot/jython/jython/Lib/test/zxjdbc In directory usw-pr-cvs1:/tmp/cvs-serv25475 Modified Files: test.xml zxtest.py Added Files: sptest.py Log Message: initial tests for procedures --- NEW FILE: sptest.py --- # Jython Database Specification API 2.0 # # $Id: sptest.py,v 1.1 2001/12/17 03:45:38 bzimmer Exp $ # # Copyright (c) 2001 brian zimmer <bz...@zi...> import sys from zxtest import zxJDBCTest from com.ziclix.python.sql import Procedure class SPTest(zxJDBCTest): """ These tests are very specific to Oracle. Eventually support for other engines will be available. """ def setUp(self): zxJDBCTest.setUp(self) c = self.cursor() try: try: c.execute("drop table plsqltest") except: self.db.rollback() try: c.execute("create table plsqltest (x char(20))") c.execute("create or replace procedure procnone is begin insert into plsqltest values ('testing'); end;") c.execute("create or replace procedure procin (y char) is begin insert into plsqltest values (y); end;") c.execute("create or replace procedure procout (y out char) is begin y := 'tested'; end;") c.execute("create or replace procedure procinout (y out varchar, z in varchar) is begin insert into plsqltest values (z); y := 'tested'; end;") c.execute("create or replace function funcnone return char is begin return 'tested'; end;") c.execute("create or replace function funcin (y char) return char is begin return y || y; end;") c.execute("create or replace function funcout (y out char) return char is begin y := 'tested'; return 'returned'; end;") c.execute("create or replace function raisesal (name char, raise number) return number is begin return raise + 100000; end;") self.db.commit() except: self.db.rollback() fail("procedure creation failed") self.proc_errors("PROC") self.proc_errors("FUNC") self.proc_errors("RAISESAL") finally: c.close() def tearDown(self): zxJDBCTest.tearDown(self) def proc_errors(self, name): c = self.cursor() try: c.execute("select * from user_errors where name like '%s%%'" % (name)) errors = c.fetchall() try: assert errors is None, "found errors" except AssertionError, e: for a in errors: print a raise e finally: c.close() def testProcinout(self): c = self.cursor() try: p = Procedure(c, "procinout") stmt = p.prepareCall() params = ["testing"] params = p.normalizeParams(params) self.assertEquals(2, len(params)) assert params[0] == p.PLACEHOLDER assert params[1] == "testing" finally: if stmt: stmt.close() c.close() def testFuncout(self): c = self.cursor() try: p = Procedure(c, "funcout") stmt = p.prepareCall() stmt.execute() self.assertEquals("returned", stmt.getString(1).strip()) self.assertEquals("tested", stmt.getString(2).strip()) finally: if stmt: stmt.close() c.close() def testProcinoutCall(self): c = self.cursor() try: c.callproc("procinout", ("testing",)) assert c.fetchall() == None, "expected None" finally: c.close() def testFuncnoneCall(self): c = self.cursor() try: c.callproc("funcnone") assert c.fetchall() == None, "expected None" finally: c.close() def testFuncinCall(self): c = self.cursor() try: c.callproc("funcin", ("testing",)) assert c.fetchall() == None, "expected None" finally: c.close() def testFuncoutCall(self): c = self.cursor() try: c.callproc("funcout") assert c.fetchall() == None, "expected None" finally: c.close() def testRaisesalaryCall(self): c = self.cursor() try: c.callproc("raisesal", ("jython developer", 18000)) assert c.fetchall() == None, "expected None" finally: c.close() Index: test.xml =================================================================== RCS file: /cvsroot/jython/jython/Lib/test/zxjdbc/test.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test.xml 2001/12/14 04:20:03 1.1 --- test.xml 2001/12/17 03:45:38 1.2 *************** *** 146,150 **** --- 146,152 ---- <testcase from="zxtest" import="BCPTest"/> <testcase from="dbextstest" import="dbextsTestCase"/> + <testcase from="sptest" import="SPTest"/> </test> + <!-- <test name="datasource" os="java"> <factory class="com.ziclix.python.sql.zxJDBC" method="connectx"> *************** *** 159,162 **** --- 161,165 ---- <testcase from="zxtest" import="BCPTest"/> </test> + --> <table ref="texttable" name="c_texttable"> create table c_texttable (a int, b varchar2(4000) not null) Index: zxtest.py =================================================================== RCS file: /cvsroot/jython/jython/Lib/test/zxjdbc/zxtest.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** zxtest.py 2001/12/14 04:20:03 1.1 --- zxtest.py 2001/12/17 03:45:38 1.2 *************** *** 339,367 **** c.close() ! def __updatecount(self, insert_only=0): ! from com.ziclix.python.sql.handler import UpdateCountDataHandler c = self.cursor() try: - c.datahandler = UpdateCountDataHandler(c.datahandler) - msg = "wrong instance, expected [UpdateCountDataHandler], got [%s]" % (str(c.datahandler)) - assert isinstance(c.datahandler, UpdateCountDataHandler), msg c.execute("insert into zxtesting values (?, ?, ?)", [(500, 'bz', 'or')]) ! assert c.datahandler.updateCount == 1, "expected [1], got [%d]" % (c.datahandler.updateCount) # there's a *feature* in the mysql engine where it returns 0 for delete if there is no # where clause, regardless of the actual value. using a where clause forces it to calculate # the appropriate value c.execute("delete from zxtesting where 1>0") ! if not insert_only: ! assert c.datahandler.updateCount == 8, "expected [8], got [%d]" % (c.datahandler.updateCount) finally: c.close() - - def testUpdateCountDataHandler(self): - """testing custom data handler for getting the update count""" - self.__updatecount() - - def testUpdateCountDataHandlerInsertOnly(self): - """testing custom data handler for getting the update count on inserts only""" - self.__updatecount(1) def _test_time(self, (tabname, sql), factory, values, _type, _cmp=cmp): --- 339,354 ---- c.close() ! def testUpdateCount(self, insert_only=0): c = self.cursor() try: c.execute("insert into zxtesting values (?, ?, ?)", [(500, 'bz', 'or')]) ! assert c.updatecount == 1, "expected [1], got [%d]" % (c.updatecount) # there's a *feature* in the mysql engine where it returns 0 for delete if there is no # where clause, regardless of the actual value. using a where clause forces it to calculate # the appropriate value c.execute("delete from zxtesting where 1>0") ! assert c.updatecount == 8, "expected [8], got [%d]" % (c.updatecount) finally: c.close() def _test_time(self, (tabname, sql), factory, values, _type, _cmp=cmp): |
From: brian z. <bz...@us...> - 2001-12-17 03:44:45
|
Update of /cvsroot/jython/jython/com/ziclix/python/sql/resource In directory usw-pr-cvs1:/tmp/cvs-serv25308/ziclix/python/sql/resource Modified Files: zxJDBCMessages.properties Log Message: execution of procedures with no output works Index: zxJDBCMessages.properties =================================================================== RCS file: /cvsroot/jython/jython/com/ziclix/python/sql/resource/zxJDBCMessages.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** zxJDBCMessages.properties 2001/12/12 17:19:45 1.3 --- zxJDBCMessages.properties 2001/12/17 03:44:42 1.4 *************** *** 78,84 **** nativesql.0=Converts the given SQL statement into the system's native SQL grammar. ! nativesql.1=A driver may convert the JDBC sql grammar into its system's native SQL\ ! grammar prior to sending it; this method returns the native form of the statement\ that the driver would have sent. # exception messages --- 78,87 ---- nativesql.0=Converts the given SQL statement into the system's native SQL grammar. ! nativesql.1=A driver may convert the JDBC sql grammar into its system's native SQL \ ! grammar prior to sending it; this method returns the native form of the statement \ that the driver would have sent. + + updateCountDeprecation=The use of UpdateCountDataHandler is deprecated in favor of \ + the .updatecount attribute on a cursor. # exception messages |
From: brian z. <bz...@us...> - 2001-12-17 03:44:45
|
Update of /cvsroot/jython/jython/com/ziclix/python/sql In directory usw-pr-cvs1:/tmp/cvs-serv25308/ziclix/python/sql Modified Files: Fetch.java PyCursor.java PyExtendedCursor.java Added Files: Procedure.java Log Message: execution of procedures with no output works --- NEW FILE: Procedure.java --- /* * Jython Database Specification API 2.0 * * $Id: Procedure.java,v 1.1 2001/12/17 03:44:42 bzimmer Exp $ * * Copyright (c) 2001 brian zimmer <bz...@zi...> * */ package com.ziclix.python.sql; import java.sql.*; import org.python.core.*; /** * Class Procedure * * @author brian zimmer * @date $today.date$ * @author last modified by $Author: bzimmer $ * @date last modified on $Date: 2001/12/17 03:44:42 $ * @version $Revision: 1.1 $ * @copyright 2001 brian zimmer */ public class Procedure extends Object { /** Field COLUMN_TYPE */ protected static final int COLUMN_TYPE = 4; /** Field DATA_TYPE */ protected static final int DATA_TYPE = 5; /** Field PLACEHOLDER */ public static final PyObject PLACEHOLDER = new PyObject(); /** Field cursor */ protected PyCursor cursor; /** Field name */ protected PyObject name; /** Field columns */ protected PyObject columns; /** * Constructor Procedure * * @param PyCursor cursor an open cursor * @param PyObject name a string or tuple representing the name * */ public Procedure(PyCursor cursor, PyObject name) { this.cursor = cursor; this.name = name; } /** * Method prepareCall * * @return CallableStatement * * @throws SQLException * */ public CallableStatement prepareCall() throws SQLException { // prepare the statement CallableStatement statement = null; try { // fetch the column information fetchColumns(); // build the full call syntax String sqlString = buildSql(); statement = cursor.connection.connection.prepareCall(sqlString); // register the OUT parameters registerOutParameters(statement); } catch (SQLException e) { if (statement == null) { try { statement.close(); } catch (Exception ex) {} } throw e; } return statement; } /** * Construct a list of the params in the proper order for the .setXXX methods of * a PreparedStatement. In the special case for a CallableStatement, insert * Procedure.PLACEHOLDER to notify the cursor to skip the slot. * * @param params a non-None list of params * * @return PyObject a list of params with Procedure.PLACEHOLDER in index for all * non IN and INOUT parameters * */ public PyObject normalizeParams(PyObject params) { if (columns == Py.None) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "too many params for input"); } if (params == Py.None) { return Py.None; } int j = 0, plen = params.__len__(); PyList population = new PyList(); for (int i = 0, len = columns.__len__(); i < len; i++) { PyObject column = columns.__getitem__(i); int colType = column.__getitem__(COLUMN_TYPE).__int__().getValue(); switch (colType) { case DatabaseMetaData.procedureColumnIn : case DatabaseMetaData.procedureColumnInOut : if (j + 1 > plen) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "too few params for input, attempting [" + (j + 1) + "] found [" + plen + "]"); } population.append(params.__getitem__(j++)); break; default : population.append(PLACEHOLDER); break; } } if (j != plen) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "too many params for input"); } return population; } /** * Returns the call in the syntax: * * {? = call <procedure-name>(?, ?, ...)} * {call <procedure-name>(?, ?, ...)} * * As of now, all parameters variables are created and no support for named variable * calling is supported. * @return String * */ protected String buildSql() throws SQLException { int colParam = 0; int colReturn = 0; if (columns != Py.None) { for (int i = 0, len = columns.__len__(); i < len; i++) { PyObject column = columns.__getitem__(i); int colType = column.__getitem__(COLUMN_TYPE).__int__().getValue(); switch (colType) { case DatabaseMetaData.procedureColumnUnknown : throw zxJDBC.makeException(zxJDBC.NotSupportedError, "procedureColumnUnknown"); case DatabaseMetaData.procedureColumnResult : throw zxJDBC.makeException(zxJDBC.NotSupportedError, "procedureColumnResult"); // these go on the right hand side case DatabaseMetaData.procedureColumnIn : case DatabaseMetaData.procedureColumnInOut : case DatabaseMetaData.procedureColumnOut : colParam++; break; // these go on the left hand side case DatabaseMetaData.procedureColumnReturn : colReturn++; break; default : throw zxJDBC.makeException(zxJDBC.DataError, "unknown column type [" + colType + "]"); } } } StringBuffer sql = new StringBuffer("{"); if (colReturn > 0) { PyList list = new PyList(); for (; colReturn > 0; colReturn--) { list.append(Py.newString("?")); } sql.append(Py.newString(",").join(list)).append(" = "); } sql.append("call ").append(name).append("("); if (colParam > 0) { PyList list = new PyList(); for (; colParam > 0; colParam--) { list.append(Py.newString("?")); } sql.append(Py.newString(",").join(list)); } return sql.append(")}").toString(); } /** * Method registerOutParameters * * @param CallableStatement statement * * @throws SQLException * */ private final void registerOutParameters(CallableStatement statement) throws SQLException { if (columns == Py.None) { return; } for (int i = 0, len = columns.__len__(); i < len; i++) { PyObject column = columns.__getitem__(i); int colType = column.__getitem__(COLUMN_TYPE).__int__().getValue(); int dataType = column.__getitem__(DATA_TYPE).__int__().getValue(); switch (colType) { case DatabaseMetaData.procedureColumnIn : case DatabaseMetaData.procedureColumnInOut : case DatabaseMetaData.procedureColumnOut : case DatabaseMetaData.procedureColumnReturn : doRegister(statement, i + 1, colType, dataType); break; } } } /** * Method doRegister * * @param CallableStatement statement * @param int index * @param int colType * @param int dataType * * @throws SQLException * */ protected void doRegister(CallableStatement statement, int index, int colType, int dataType) throws SQLException { statement.registerOutParameter(index, dataType); } /** * Method fetchColumns * * @throws SQLException * */ protected void fetchColumns() throws SQLException { PyExtendedCursor pec = (PyExtendedCursor)cursor.connection.cursor(); try { pec.datahandler = this.cursor.datahandler; pec.procedurecolumns(Py.newString(""), Py.newString(""), name, Py.None); this.columns = pec.fetchall(); } finally { pec.close(); } } } Index: Fetch.java =================================================================== RCS file: /cvsroot/jython/jython/com/ziclix/python/sql/Fetch.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fetch.java 2001/11/20 04:55:18 1.1 --- Fetch.java 2001/12/17 03:44:42 1.2 *************** *** 83,87 **** /** ! * Method add * * @param ResultSet resultSet --- 83,87 ---- /** ! * Create the results after a successful execution and manages the result set. * * @param ResultSet resultSet *************** *** 91,95 **** /** ! * Method add * * @param ResultSet resultSet --- 91,98 ---- /** ! * Create the results after a successful execution and manages the result set. ! * Optionally takes a set of JDBC-indexed columns to automatically set to None ! * primarily to support getTypeInfo() which sets a column type of a number but ! * doesn't use the value so a driver is free to put anything it wants there. * * @param ResultSet resultSet *************** *** 100,103 **** --- 103,117 ---- /** + * Method add + * + * @param CallableStatement callableStatement + * @param Procedure procedure + * + */ + public void add(CallableStatement callableStatement, Procedure procedure) { + return; + } + + /** * Fetch the next row of a query result set, returning a single sequence, * or None when no more data is available. *************** *** 129,133 **** * @return a sequence of sequences from the result set, or None when no more data is available */ ! abstract public PyObject fetchall(); /** --- 143,157 ---- * @return a sequence of sequences from the result set, or None when no more data is available */ ! public final PyObject fetchall() { ! return doFetchall(); ! } ! ! /** ! * Method doFetchall ! * ! * @return PyObject ! * ! */ ! abstract protected PyObject doFetchall(); /** *************** *** 152,163 **** * @return a sequence of sequences from the result set, or None when no more data is available */ ! abstract public PyObject fetchmany(int size); /** * Move the result pointer to the next set if available. * * @return true if more sets exist, else None */ ! abstract public PyObject nextset(); /** --- 176,214 ---- * @return a sequence of sequences from the result set, or None when no more data is available */ ! public final PyObject fetchmany(int size) { ! return doFetchmany(size); ! } /** + * Method doFetchmany + * + * @param int size + * + * @return PyObject + * + */ + abstract protected PyObject doFetchmany(int size); + + /** * Move the result pointer to the next set if available. * * @return true if more sets exist, else None */ ! public final PyObject nextset() { ! return doNextset(); ! } ! ! /** ! * Method doNextset ! * ! * @return PyObject ! * ! */ ! abstract protected PyObject doNextset(); ! ! /** ! * Cleanup any resources. ! */ ! abstract public void close() throws SQLException; /** *************** *** 270,280 **** return this.description; } - - /** - * Cleanup any resources. - */ - public void close() throws SQLException { - return; - } } --- 321,324 ---- *************** *** 302,306 **** super(cursor); ! this.results = new ArrayList(); this.counter = -1; } --- 346,350 ---- super(cursor); ! this.results = new LinkedList(); this.counter = -1; } *************** *** 360,364 **** * @return a sequence of sequences from the result set, or None when no more data is available */ ! public PyObject fetchall() { return fetchmany(this.rowcount); } --- 404,408 ---- * @return a sequence of sequences from the result set, or None when no more data is available */ ! public PyObject doFetchall() { return fetchmany(this.rowcount); } *************** *** 385,389 **** * @return a sequence of sequences from the result set, or None when no more data is available */ ! public PyObject fetchmany(int size) { PyObject res = Py.None, current = Py.None; --- 429,433 ---- * @return a sequence of sequences from the result set, or None when no more data is available */ ! public PyObject doFetchmany(int size) { PyObject res = Py.None, current = Py.None; *************** *** 414,418 **** * @return true if more sets exist, else None */ ! public PyObject nextset() { PyObject next = Py.None; --- 458,462 ---- * @return true if more sets exist, else None */ ! public PyObject doNextset() { PyObject next = Py.None; *************** *** 501,504 **** --- 545,562 ---- /** + * Iterate the remaining contents of the ResultSet and return. + */ + public PyObject doFetchall() { + return fetch(0, true); + } + + /** + * Iterate up to size rows remaining in the ResultSet and return. + */ + public PyObject doFetchmany(int size) { + return fetch(size, false); + } + + /** * Internal use only. If <i>all</i> is true, return everything * that's left in the result set, otherwise return up to size. Fewer *************** *** 506,510 **** * the set. */ ! private PyObject fetchmany(int size, boolean all) { if (this.resultSet == null) { --- 564,568 ---- * the set. */ ! private PyObject fetch(int size, boolean all) { if (this.resultSet == null) { *************** *** 535,539 **** * Always returns None. */ ! public PyObject nextset() { return Py.None; } --- 593,597 ---- * Always returns None. */ ! public PyObject doNextset() { return Py.None; } *************** *** 551,568 **** this.resultSet = null; - } - - /** - * Iterate the remaining contents of the ResultSet and return. - */ - public PyObject fetchall() { - return fetchmany(0, true); - } - - /** - * Iterate up to size rows remaining in the ResultSet and return. - */ - public PyObject fetchmany(int size) { - return fetchmany(size, false); } } --- 609,612 ---- Index: PyCursor.java =================================================================== RCS file: /cvsroot/jython/jython/com/ziclix/python/sql/PyCursor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyCursor.java 2001/12/16 05:01:27 1.9 --- PyCursor.java 2001/12/17 03:44:42 1.10 *************** *** 39,42 **** --- 39,45 ---- protected PyObject rowid; + /** Field updatecount */ + protected PyObject updatecount; + /** Field dynamicFetch */ protected boolean dynamicFetch; *************** *** 115,119 **** m[6] = new PyString("callproc"); __methods__ = new PyList(m); ! m = new PyObject[6]; m[0] = new PyString("arraysize"); m[1] = new PyString("rowcount"); --- 118,122 ---- m[6] = new PyString("callproc"); __methods__ = new PyList(m); ! m = new PyObject[7]; m[0] = new PyString("arraysize"); m[1] = new PyString("rowcount"); *************** *** 122,125 **** --- 125,129 ---- m[4] = new PyString("warnings"); m[5] = new PyString("rowid"); + m[6] = new PyString("updatecount"); __members__ = new PyList(m); } *************** *** 173,176 **** --- 177,182 ---- } else if ("rowid".equals(name)) { return rowid; + } else if ("updatecount".equals(name)) { + return updatecount; } else if ("datahandler".equals(name)) { return Py.java2py(this.datahandler); *************** *** 312,316 **** * through the standard fetchXXX() methods. */ ! public void callproc(String sqlString, PyObject params, PyObject bindings, PyObject maxRows) { clear(); --- 318,322 ---- * through the standard fetchXXX() methods. */ ! public void callproc(PyObject name, PyObject params, PyObject bindings, PyObject maxRows) { clear(); *************** *** 318,328 **** try { if (getMetaData().supportsStoredProcedures()) { ! this.sqlStatement = this.connection.connection.prepareCall(sqlString); if (maxRows != Py.None) { this.sqlStatement.setMaxRows(maxRows.__int__().getValue()); } ! execute(params, bindings); } else { throw zxJDBC.makeException(zxJDBC.NotSupportedError, zxJDBC.getString("noStoredProc")); --- 324,352 ---- try { if (getMetaData().supportsStoredProcedures()) { ! if (isSeqSeq(params)) { ! throw zxJDBC.makeException(zxJDBC.NotSupportedError, "sequence of sequences is not supported"); ! } + final Procedure procedure = new Procedure(this, name); + + this.sqlStatement = procedure.prepareCall(); + if (maxRows != Py.None) { this.sqlStatement.setMaxRows(maxRows.__int__().getValue()); } ! params = procedure.normalizeParams(params); ! ! prepare(params, bindings); ! execute(new ExecuteSQL() { ! ! public void executeSQL() throws SQLException { ! ! final CallableStatement callableStatement = (CallableStatement)sqlStatement; ! ! callableStatement.execute(); ! fetch.add(callableStatement, procedure); ! } ! }); } else { throw zxJDBC.makeException(zxJDBC.NotSupportedError, zxJDBC.getString("noStoredProc")); *************** *** 390,393 **** --- 414,426 ---- if (hasParams) { + ExecuteSQL esql = new ExecuteSQL() { + + public void executeSQL() throws SQLException { + + if (((PreparedStatement)sqlStatement).execute()) { + fetch.add(sqlStatement.getResultSet()); + } + } + }; // if we have a sequence of sequences, let's run through them and finish *************** *** 398,405 **** PyObject param = params.__getitem__(i); ! execute(param, bindings); } } else { ! execute(params, bindings); } } else { --- 431,440 ---- PyObject param = params.__getitem__(i); ! prepare(param, bindings); ! execute(esql); } } else { ! prepare(params, bindings); ! execute(esql); } } else { *************** *** 411,415 **** if (sqlStatement.execute(sqlString)) { ! create(sqlStatement.getResultSet()); } } --- 446,450 ---- if (sqlStatement.execute(sqlString)) { ! fetch.add(sqlStatement.getResultSet()); } } *************** *** 439,442 **** --- 474,478 ---- this.rowid = this.datahandler.getRowId(this.sqlStatement); + this.updatecount = Py.newInteger(this.sqlStatement.getUpdateCount()); addWarning(this.sqlStatement.getWarnings()); *************** *** 445,450 **** /** ! * The workhorse for properly preparing the parameters and executing a ! * prepared statement. * * @param PyObject params a non-None seq of sequences or entities --- 481,485 ---- /** ! * Properly prepare the parameters of a prepared statement. * * @param PyObject params a non-None seq of sequences or entities *************** *** 454,459 **** * */ ! protected void execute(PyObject params, PyObject bindings) throws SQLException { // [3, 4] or (3, 4) final PreparedStatement preparedStatement = (PreparedStatement)this.sqlStatement; --- 489,498 ---- * */ ! protected void prepare(PyObject params, PyObject bindings) throws SQLException { + if (params == Py.None) { + return; + } + // [3, 4] or (3, 4) final PreparedStatement preparedStatement = (PreparedStatement)this.sqlStatement; *************** *** 465,468 **** --- 504,511 ---- PyObject param = params.__getitem__(i); + if (param == Procedure.PLACEHOLDER) { + continue; + } + if (bindings != Py.None) { PyObject binding = bindings.__finditem__(Py.newInteger(i)); *************** *** 486,499 **** } - execute(new ExecuteSQL() { - - public void executeSQL() throws SQLException { - - if (preparedStatement.execute()) { - create(preparedStatement.getResultSet()); - } - } - }); - return; } --- 529,532 ---- *************** *** 561,586 **** /** - * Create the results after a successful execution and manages the result set. - * - * @param rs A ResultSet. - */ - protected void create(ResultSet rs) { - create(rs, null); - } - - /** - * Create the results after a successful execution and manages the result set. - * Optionally takes a set of JDBC-indexed columns to automatically set to None - * primarily to support getTypeInfo() which sets a column type of a number but - * doesn't use the value so a driver is free to put anything it wants there. - * - * @param rs A ResultSet. - * @param skipCols set of JDBC-indexed columns to automatically set as None - */ - protected void create(ResultSet rs, Set skipCols) { - this.fetch.add(rs, skipCols); - } - - /** * Adds a warning to the tuple and will follow the chain as necessary. */ --- 594,597 ---- *************** *** 621,624 **** --- 632,636 ---- this.warnings = Py.None; this.rowid = Py.None; + this.updatecount = Py.newInteger(-1); try { *************** *** 807,811 **** case 8 : ! cursor.callproc(arg.__str__().toString(), Py.None, Py.None, Py.None); return Py.None; --- 819,823 ---- case 8 : ! cursor.callproc(arg, Py.None, Py.None, Py.None); return Py.None; *************** *** 845,849 **** case 8 : ! cursor.callproc(arga.__str__().toString(), argb, Py.None, Py.None); return Py.None; --- 857,861 ---- case 8 : ! cursor.callproc(arga, argb, Py.None, Py.None); return Py.None; *************** *** 881,885 **** case 8 : ! cursor.callproc(arga.__str__().toString(), argb, argc, Py.None); return Py.None; --- 893,897 ---- case 8 : ! cursor.callproc(arga, argb, argc, Py.None); return Py.None; *************** *** 908,912 **** PyCursor cursor = (PyCursor)__self__; PyArgParser parser = new PyArgParser(args, keywords); ! String sql = parser.arg(0).__str__().toString(); PyObject params = parser.kw("params", Py.None); PyObject bindings = parser.kw("bindings", Py.None); --- 920,924 ---- PyCursor cursor = (PyCursor)__self__; PyArgParser parser = new PyArgParser(args, keywords); ! PyObject sql = parser.arg(0); PyObject params = parser.kw("params", Py.None); PyObject bindings = parser.kw("bindings", Py.None); *************** *** 920,924 **** case 5 : ! cursor.execute(sql, params, bindings, maxrows); return Py.None; --- 932,936 ---- case 5 : ! cursor.execute(sql.__str__().toString(), params, bindings, maxrows); return Py.None; *************** *** 930,934 **** case 9 : ! cursor.executemany(sql, params, bindings, maxrows); return Py.None; --- 942,946 ---- case 9 : ! cursor.executemany(sql.__str__().toString(), params, bindings, maxrows); return Py.None; Index: PyExtendedCursor.java =================================================================== RCS file: /cvsroot/jython/jython/com/ziclix/python/sql/PyExtendedCursor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyExtendedCursor.java 2001/12/12 17:19:45 1.5 --- PyExtendedCursor.java 2001/12/17 03:44:42 1.6 *************** *** 44,48 **** static { ! PyObject[] m = new PyObject[7]; m[0] = new PyString("tables"); --- 44,48 ---- static { ! PyObject[] m = new PyObject[9]; m[0] = new PyString("tables"); *************** *** 53,56 **** --- 53,58 ---- m[5] = new PyString("procedurecolumns"); m[6] = new PyString("statistics"); + m[7] = new PyString("bestrow"); + m[8] = new PyString("versioncolumns"); __methods__ = new PyList(m); *************** *** 111,114 **** --- 113,118 ---- dict.__setitem__("gettypeinfo", new ExtendedCursorFunc("gettypeinfo", 107, 0, 1, "query for sql type info")); dict.__setitem__("gettabletypeinfo", new ExtendedCursorFunc("gettabletypeinfo", 108, 0, 1, "query for table types")); + dict.__setitem__("bestrow", new ExtendedCursorFunc("bestrow", 109, 4, 4, "query for table types")); + dict.__setitem__("versioncolumns", new ExtendedCursorFunc("versioncolumns", 110, 3, 3, "query for table types")); // hide from python *************** *** 169,173 **** try { ! create(getMetaData().getTables(q, o, t, y)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 173,177 ---- try { ! this.fetch.add(getMetaData().getTables(q, o, t, y)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 193,197 **** try { ! create(getMetaData().getColumns(q, o, t, c)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 197,201 ---- try { ! this.fetch.add(getMetaData().getColumns(q, o, t, c)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 215,219 **** try { ! create(getMetaData().getProcedures(q, o, p)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 219,223 ---- try { ! this.fetch.add(getMetaData().getProcedures(q, o, p)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 239,243 **** try { ! create(getMetaData().getProcedureColumns(q, o, p, c)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 243,247 ---- try { ! this.fetch.add(getMetaData().getProcedureColumns(q, o, p, c)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 262,266 **** try { ! create(getMetaData().getPrimaryKeys(q, o, t)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 266,270 ---- try { ! this.fetch.add(getMetaData().getPrimaryKeys(q, o, t)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 295,299 **** try { ! create(getMetaData().getCrossReference(pq, po, pt, fq, fo, ft)); } catch (SQLException e) { throw zxJDBC.newError(e); --- 299,303 ---- try { ! this.fetch.add(getMetaData().getCrossReference(pq, po, pt, fq, fo, ft)); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 326,330 **** try { ! create(getMetaData().getIndexInfo(q, o, t, u, a), skipCols); } catch (SQLException e) { throw zxJDBC.newError(e); --- 330,334 ---- try { ! this.fetch.add(getMetaData().getIndexInfo(q, o, t, u, a), skipCols); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 347,351 **** try { ! create(getMetaData().getTypeInfo(), skipCols); } catch (SQLException e) { throw zxJDBC.newError(e); --- 351,355 ---- try { ! this.fetch.add(getMetaData().getTypeInfo(), skipCols); } catch (SQLException e) { throw zxJDBC.newError(e); *************** *** 375,383 **** try { ! create(getMetaData().getTableTypes()); } catch (SQLException e) { throw zxJDBC.newError(e); } } } --- 379,435 ---- try { ! this.fetch.add(getMetaData().getTableTypes()); ! } catch (SQLException e) { ! throw zxJDBC.newError(e); ! } ! } ! ! /** ! * Gets a description of a table's optimal set of columns that uniquely ! * identifies a row. They are ordered by SCOPE. ! * ! * @param qualifier ! * @param owner ! * @param table ! */ ! protected void bestrow(PyObject qualifier, PyObject owner, PyObject table) { ! ! clear(); ! ! String c = datahandler.getMetaDataName(qualifier); ! String s = datahandler.getMetaDataName(owner); ! String t = datahandler.getMetaDataName(table); ! int p = DatabaseMetaData.bestRowUnknown; // scope ! boolean n = true; // nullable ! ! try { ! this.fetch.add(getMetaData().getBestRowIdentifier(c, s, t, p, n)); } catch (SQLException e) { throw zxJDBC.newError(e); } } + + /** + * Gets a description of a table's columns that are automatically + * updated when any value in a row is updated. They are unordered. + * + * @param qualifier a schema name + * @param owner an owner name + * @param table a table name + */ + protected void versioncolumns(PyObject qualifier, PyObject owner, PyObject table) { + + clear(); + + String q = datahandler.getMetaDataName(qualifier); + String o = datahandler.getMetaDataName(owner); + String t = datahandler.getMetaDataName(table); + + try { + this.fetch.add(getMetaData().getVersionColumns(q, o, t)); + } catch (SQLException e) { + throw zxJDBC.newError(e); + } + } } *************** *** 494,497 **** --- 546,559 ---- case 104 : cursor.procedures(arga, argb, argc); + + return Py.None; + + case 109 : + cursor.bestrow(arga, argb, argc); + + return Py.None; + + case 110 : + cursor.versioncolumns(arga, argb, argc); return Py.None; |
From: brian z. <bz...@us...> - 2001-12-17 03:44:45
|
Update of /cvsroot/jython/jython/com/ziclix/python/sql/handler In directory usw-pr-cvs1:/tmp/cvs-serv25308/ziclix/python/sql/handler Modified Files: UpdateCountDataHandler.java Log Message: execution of procedures with no output works Index: UpdateCountDataHandler.java =================================================================== RCS file: /cvsroot/jython/jython/com/ziclix/python/sql/handler/UpdateCountDataHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UpdateCountDataHandler.java 2001/11/20 04:55:18 1.1 --- UpdateCountDataHandler.java 2001/12/17 03:44:42 1.2 *************** *** 31,34 **** --- 31,36 ---- public class UpdateCountDataHandler extends FilterDataHandler { + private static boolean once = false; + /** * The update count for the last executed statement. *************** *** 44,47 **** --- 46,54 ---- super(datahandler); + + if (!once) { + Py.writeError("UpdateCountDataHandler", zxJDBC.getString("updateCountDeprecation")); + once = true; + } this.updateCount = -1; |
From: Finn B. <bc...@us...> - 2001-12-16 21:03:20
|
Update of /cvsroot/jython/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv11771 Modified Files: fixrepo Log Message: Reset the contents so that subsequent commits doesn't overide more file. Index: fixrepo =================================================================== RCS file: /cvsroot/jython/CVSROOT/fixrepo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fixrepo 2001/12/16 20:57:16 1.2 --- fixrepo 2001/12/16 21:03:18 1.3 *************** *** 12,86 **** import binascii, sys, os, string ! file = "/cvsroot/jython/jython/org/python/core/Java2Accessibility.java,v" uudata = """ - M:&5A9 DR+C0["F%C8V5S<SL*<WEM8F]L<PH)4F5L96%S95\R7S%B971A,3HR - M+C0*"5)E;&5A<V5?,E\Q86QP:&$S.C(N- H)4F5L96%S95\R7S%A;'!H83(Z - M,BXT"@E296QE87-E7S)?,6%L<&AA,3HR+C0*"5)E;&5A<V5?,E\P.C(N,@H) - M4F5L96%S95\R7S!R8S$Z,BXR"@E296QE87-E7S)?,&)E=&$R.C(N,@H)4F5L - M96%S95\R7S!B971A,3HR+C(*"5)E;&5A<V5?,E\P86QP:&$S.C(N,@H)4F5L - M96%S95\R7S!A;'!H83(Z,BXR"@E296QE87-E7S)?,&%L<&AA,3HR+C(*"5)E - M;&5A<V5?,5\Q<F,Q.C(N,@H)4F5L96%S95\Q7S%B971A-#HR+C(*"5)E;&5A - M<V5?,5\Q8F5T83,Z,BXR.PIL;V-K<SL@<W1R:6-T.PIC;VUM96YT"4 C($ [ - M"@H*,BXT"F1A=&4),C P,2XP,BXR-2XQ-BXS.2XR.#L)875T:&]R(&)C:V9N - M;CL)<W1A=&4@17AP.PIB<F%N8VAE<SL*;F5X= DR+C,["@HR+C,*9&%T90DR - M,# Q+C R+C Q+C$V+C0Q+C$P.PEA=71H;W(@8F-K9FYN.PES=&%T92!%>' [ - M"F)R86YC:&5S.PIN97AT"3(N,CL*"C(N,@ID871E"3DY+C Y+C$V+C(Q+C4V - M+C4X.PEA=71H;W(@8G=A<G-A=SL)<W1A=&4@17AP.PIB<F%N8VAE<SL*;F5X - M= DR+C$["@HR+C$*9&%T90DY.2XP.2XQ-BXR,2XU-BXS,SL)875T:&]R(&)W - M87)S87<["7-T871E($5X<#L*8G)A;F-H97,["FYE>'0),2XQ.PH*,2XQ"F1A - M=&4).3DN,#DN,38N,C$N-3(N-3<["6%U=&AO<B!B=V%R<V%W.PES=&%T92!D - M96%D.PIB<F%N8VAE<PH),2XQ+C(N,3L*;F5X= D["@HQ+C$N,BXQ"F1A=&4) - M.3DN,#DN,38N,C$N-3(N-3<["6%U=&AO<B!B=V%R<V%W.PES=&%T92!%>' [ - M"F)R86YC:&5S.PIN97AT"3L*"@ID97-C"D! "@H*"@H*,BXT"FQO9PI 36%D - M92!C;&%S<R!P86-K86=E('!R:79A=&4N"D *=&5X= I <&%C:V%G92!O<F<N - M<'ET:&]N+F-O<F4["FEM<&]R="!J879A+FQA;F<N<F5F;&5C="XJ.PH*+RHJ - M"B J(%!R;W9I9&5S('1H92!*879A(#(@>T9I96QD?$UE=&AO9'Q#;VYS=')U - M8W1O<GTN<V5T06-C97-S:6)I;&ET>2@I"B J(&UE=&AO9',@=VAE;B!C;VUP - M:6QE9"!W:71H+"!A;F0@<G5N;FEN9R!U;F1E<B!*879A(#(N"B J"B J(%1H - M:7,@8VQA<W,@<VAO=6QD(&YO="!B92!C;VUP:6QI960@*&%N9"!I="!W;VXG - M="!C;VUP:6QE*2!U;F1E<B!*879A(#$N"B J+PH*8VQA<W,@2F%V83)!8V-E - M<W-I8FEL:71Y(&5X=&5N9',@2F%V84%C8V5S<VEB:6QI='D*>PH@(" @=F]I - M9"!S971!8V-E<W,H1FEE;&0@9FEE;&0L(&)O;VQE86X@9FQA9RD@=&AR;W=S - M(%-E8W5R:71Y17AC97!T:6]N('L*(" @(" @("!F:65L9"YS971!8V-E<W-I - M8FQE*&9L86<I.PH@(" @?0H*(" @('9O:60@<V5T06-C97-S*$UE=&AO9"!M - M971H;V0L(&)O;VQE86X@9FQA9RD@=&AR;W=S(%-E8W5R:71Y17AC97!T:6]N - M('L*(" @(" @("!M971H;V0N<V5T06-C97-S:6)L92AF;&%G*3L*(" @('T* - M"B @("!V;VED('-E=$%C8V5S<RA#;VYS=')U8W1O<B!C;VYS=')U8W1O<BP@ - M8F]O;&5A;B!F;&%G*0H@(" @(" @('1H<F]W<R!396-U<FET>45X8V5P=&EO - M;@H@(" @>PH@(" @(" @(&-O;G-T<G5C=&]R+G-E=$%C8V5S<VEB;&4H9FQA - M9RD["B @("!]"GT*0 H*"C(N,PIL;V<*0$-O;G-I<W1E;G0@9F]R;6%T=&EN - M9RX@4F5M;W9E9"!T<F%L:6YG('-P86-E<R!A;F0@=&%B<RX*0 IT97AT"D!D - M,3$@,0IA,3$@,0IP=6)L:6,@8VQA<W,@2F%V83)!8V-E<W-I8FEL:71Y(&5X - M=&5N9',@2F%V84%C8V5S<VEB:6QI='D*0 H*"C(N,@IL;V<*0%1O;GD@4&QA - M=&4G<R!I;7!L96UE;G1A=&EO;BP@;6]D:69I960@8GD@0D%7+"!O9B!A('!O - M<G1A8FQE(&UE8VAA;FES;0IF;W(@<V5L96-T:79E(&%C8V5S<R!T;R!N;VXM - M<'5B;&EC(&UE;6)E<G,@=&AR;W5G:"!*4'ET:&]N+@I "G1E>'0*0&0Q-" Q - M"F$Q-" Q"@EF:65L9"YS971!8V-E<W-I8FQE*&9L86<I.PID,3@@,0IA,3@@ - M,0H);65T:&]D+G-E=$%C8V5S<VEB;&4H9FQA9RD["F0R-" Q"F$R-" Q"B ) - M8V]N<W1R=6-T;W(N<V5T06-C97-S:6)L92AF;&%G*3L*0 H*"C(N,0IL;V<* - M0&EN=&5R;65D:6%T90I "G1E>'0*0&0V(#$*838@,0H@*B!M971H;V1S('=H - M96X@8V]M<&EL960@=VET:"!*879A(#(N"D *"@HQ+C$*;&]G"D!F:6QE($IA - M=F$R06-C97-S:6)I;&ET>2YJ879A('=A<R!I;FET:6%L;'D@861D960@;VX@ - M8G)A;F-H(#(N,"X*0 IT97AT"D!D,2 R-@I "@H*,2XQ+C(N,0IL;V<*0$EM - M<&QE;65N=&%T:6]N<R!B>2!4;VYY(%!L871E+"!M;V1I9FEE9"!B>2!"05<L - M(&]F(&$@<&]R=&%B;&4*;65C:&%N:7-M(&9O<B!S96QE8W1I=F5L>2!A8V-E - M<W-I;F<@;F]N+7!U8FQI8R!M96UB97)S('1H;W5G:"!0>71H;VXN"D *=&5X - M= I 83 @,C8*<&%C:V%G92!O<F<N<'ET:&]N+F-O<F4["FEM<&]R="!J879A - M+FQA;F<N<F5F;&5C="XJ.PH*+RHJ"B J(%!R;W9I9&5S('1H92!*879A(#(@ - M>T9I96QD?$UE=&AO9'Q#;VYS=')U8W1O<GTN<V5T06-C97-S:6)I;&ET>2@I - M"B J(&UE=&AO9',@=VAE;B!C;VUP:6QE9"!W:71H($IA=F$@,BX*("H*("H@ - M5&AI<R!C;&%S<R!S:&]U;&0@;F]T(&)E(&-O;7!I;&EE9" H86YD(&ET('=O - M;B=T(&-O;7!I;&4I('5N9&5R($IA=F$@,2X*("HO"@IP=6)L:6,@8VQA<W,@ - M2F%V83)!8V-E<W-I8FEL:71Y(&5X=&5N9',@2F%V84%C8V5S<VEB:6QI='D* - M>PH@(" @=F]I9"!S971!8V-E<W,H1FEE;&0@9FEE;&0L(&)O;VQE86X@9FQA - M9RD@=&AR;W=S(%-E8W5R:71Y17AC97!T:6]N('L*"69I96QD+G-E=$%C8V5S - M<VEB;&4H9FQA9RD["B @("!]"@H@(" @=F]I9"!S971!8V-E<W,H365T:&]D - M(&UE=&AO9"P@8F]O;&5A;B!F;&%G*2!T:')O=W,@4V5C=7)I='E%>&-E<'1I - M;VX@>PH);65T:&]D+G-E=$%C8V5S<VEB;&4H9FQA9RD["B @("!]"@H@(" @ - M=F]I9"!S971!8V-E<W,H0V]N<W1R=6-T;W(@8V]N<W1R=6-T;W(L(&)O;VQE - M86X@9FQA9RD*(" @(" @("!T:')O=W,@4V5C=7)I='E%>&-E<'1I;VX*(" @ - M('L*( EC;VYS=')U8W1O<BYS971!8V-E<W-I8FQE*&9L86<I.PH@(" @?0I] - $"D *"@ """ --- 12,18 ---- import binascii, sys, os, string ! file = None uudata = """ """ |
From: Finn B. <bc...@us...> - 2001-12-16 20:55:57
|
Update of /cvsroot/jython/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv10047 Modified Files: checkoutlist loginfo Added Files: fixrepo Log Message: Temporary way of editing the CVS repository. --- NEW FILE: fixrepo --- #! /usr/bin/python # -*- Python -*- # # A tempory utility program to fix problems in the CVS repository. # This wouldn't be needed if we had shell access to the CVS server. # # When this program is added to the loginfo file, it can be used to # edit the repository every time the file is commited. # import binascii, sys, os, string file = "/cvsroot/jython/jython/org/python/core/Java2Accessibility.java,v" uudata = """ M:&5A9 DR+C0["F%C8V5S<SL*<WEM8F]L<PH)4F5L96%S95\R7S%B971A,3HR M+C0*"5)E;&5A<V5?,E\Q86QP:&$S.C(N- H)4F5L96%S95\R7S%A;'!H83(Z M,BXT"@E296QE87-E7S)?,6%L<&AA,3HR+C0*"5)E;&5A<V5?,E\P.C(N,@H) M4F5L96%S95\R7S!R8S$Z,BXR"@E296QE87-E7S)?,&)E=&$R.C(N,@H)4F5L M96%S95\R7S!B971A,3HR+C(*"5)E;&5A<V5?,E\P86QP:&$S.C(N,@H)4F5L M96%S95\R7S!A;'!H83(Z,BXR"@E296QE87-E7S)?,&%L<&AA,3HR+C(*"5)E M;&5A<V5?,5\Q<F,Q.C(N,@H)4F5L96%S95\Q7S%B971A-#HR+C(*"5)E;&5A M<V5?,5\Q8F5T83,Z,BXR.PIL;V-K<SL@<W1R:6-T.PIC;VUM96YT"4 C($ [ M"@H*,BXT"F1A=&4),C P,2XP,BXR-2XQ-BXS.2XR.#L)875T:&]R(&)C:V9N M;CL)<W1A=&4@17AP.PIB<F%N8VAE<SL*;F5X= DR+C,["@HR+C,*9&%T90DR M,# Q+C R+C Q+C$V+C0Q+C$P.PEA=71H;W(@8F-K9FYN.PES=&%T92!%>' [ M"F)R86YC:&5S.PIN97AT"3(N,CL*"C(N,@ID871E"3DY+C Y+C$V+C(Q+C4V M+C4X.PEA=71H;W(@8G=A<G-A=SL)<W1A=&4@17AP.PIB<F%N8VAE<SL*;F5X M= DR+C$["@HR+C$*9&%T90DY.2XP.2XQ-BXR,2XU-BXS,SL)875T:&]R(&)W M87)S87<["7-T871E($5X<#L*8G)A;F-H97,["FYE>'0),2XQ.PH*,2XQ"F1A M=&4).3DN,#DN,38N,C$N-3(N-3<["6%U=&AO<B!B=V%R<V%W.PES=&%T92!D M96%D.PIB<F%N8VAE<PH),2XQ+C(N,3L*;F5X= D["@HQ+C$N,BXQ"F1A=&4) M.3DN,#DN,38N,C$N-3(N-3<["6%U=&AO<B!B=V%R<V%W.PES=&%T92!%>' [ M"F)R86YC:&5S.PIN97AT"3L*"@ID97-C"D! "@H*"@H*,BXT"FQO9PI 36%D M92!C;&%S<R!P86-K86=E('!R:79A=&4N"D *=&5X= I <&%C:V%G92!O<F<N M<'ET:&]N+F-O<F4["FEM<&]R="!J879A+FQA;F<N<F5F;&5C="XJ.PH*+RHJ M"B J(%!R;W9I9&5S('1H92!*879A(#(@>T9I96QD?$UE=&AO9'Q#;VYS=')U M8W1O<GTN<V5T06-C97-S:6)I;&ET>2@I"B J(&UE=&AO9',@=VAE;B!C;VUP M:6QE9"!W:71H+"!A;F0@<G5N;FEN9R!U;F1E<B!*879A(#(N"B J"B J(%1H M:7,@8VQA<W,@<VAO=6QD(&YO="!B92!C;VUP:6QI960@*&%N9"!I="!W;VXG M="!C;VUP:6QE*2!U;F1E<B!*879A(#$N"B J+PH*8VQA<W,@2F%V83)!8V-E M<W-I8FEL:71Y(&5X=&5N9',@2F%V84%C8V5S<VEB:6QI='D*>PH@(" @=F]I M9"!S971!8V-E<W,H1FEE;&0@9FEE;&0L(&)O;VQE86X@9FQA9RD@=&AR;W=S M(%-E8W5R:71Y17AC97!T:6]N('L*(" @(" @("!F:65L9"YS971!8V-E<W-I M8FQE*&9L86<I.PH@(" @?0H*(" @('9O:60@<V5T06-C97-S*$UE=&AO9"!M M971H;V0L(&)O;VQE86X@9FQA9RD@=&AR;W=S(%-E8W5R:71Y17AC97!T:6]N M('L*(" @(" @("!M971H;V0N<V5T06-C97-S:6)L92AF;&%G*3L*(" @('T* M"B @("!V;VED('-E=$%C8V5S<RA#;VYS=')U8W1O<B!C;VYS=')U8W1O<BP@ M8F]O;&5A;B!F;&%G*0H@(" @(" @('1H<F]W<R!396-U<FET>45X8V5P=&EO M;@H@(" @>PH@(" @(" @(&-O;G-T<G5C=&]R+G-E=$%C8V5S<VEB;&4H9FQA M9RD["B @("!]"GT*0 H*"C(N,PIL;V<*0$-O;G-I<W1E;G0@9F]R;6%T=&EN M9RX@4F5M;W9E9"!T<F%L:6YG('-P86-E<R!A;F0@=&%B<RX*0 IT97AT"D!D M,3$@,0IA,3$@,0IP=6)L:6,@8VQA<W,@2F%V83)!8V-E<W-I8FEL:71Y(&5X M=&5N9',@2F%V84%C8V5S<VEB:6QI='D*0 H*"C(N,@IL;V<*0%1O;GD@4&QA M=&4G<R!I;7!L96UE;G1A=&EO;BP@;6]D:69I960@8GD@0D%7+"!O9B!A('!O M<G1A8FQE(&UE8VAA;FES;0IF;W(@<V5L96-T:79E(&%C8V5S<R!T;R!N;VXM M<'5B;&EC(&UE;6)E<G,@=&AR;W5G:"!*4'ET:&]N+@I "G1E>'0*0&0Q-" Q M"F$Q-" Q"@EF:65L9"YS971!8V-E<W-I8FQE*&9L86<I.PID,3@@,0IA,3@@ M,0H);65T:&]D+G-E=$%C8V5S<VEB;&4H9FQA9RD["F0R-" Q"F$R-" Q"B ) M8V]N<W1R=6-T;W(N<V5T06-C97-S:6)L92AF;&%G*3L*0 H*"C(N,0IL;V<* M0&EN=&5R;65D:6%T90I "G1E>'0*0&0V(#$*838@,0H@*B!M971H;V1S('=H M96X@8V]M<&EL960@=VET:"!*879A(#(N"D *"@HQ+C$*;&]G"D!F:6QE($IA M=F$R06-C97-S:6)I;&ET>2YJ879A('=A<R!I;FET:6%L;'D@861D960@;VX@ M8G)A;F-H(#(N,"X*0 IT97AT"D!D,2 R-@I "@H*,2XQ+C(N,0IL;V<*0$EM M<&QE;65N=&%T:6]N<R!B>2!4;VYY(%!L871E+"!M;V1I9FEE9"!B>2!"05<L M(&]F(&$@<&]R=&%B;&4*;65C:&%N:7-M(&9O<B!S96QE8W1I=F5L>2!A8V-E M<W-I;F<@;F]N+7!U8FQI8R!M96UB97)S('1H;W5G:"!0>71H;VXN"D *=&5X M= I 83 @,C8*<&%C:V%G92!O<F<N<'ET:&]N+F-O<F4["FEM<&]R="!J879A M+FQA;F<N<F5F;&5C="XJ.PH*+RHJ"B J(%!R;W9I9&5S('1H92!*879A(#(@ M>T9I96QD?$UE=&AO9'Q#;VYS=')U8W1O<GTN<V5T06-C97-S:6)I;&ET>2@I M"B J(&UE=&AO9',@=VAE;B!C;VUP:6QE9"!W:71H($IA=F$@,BX*("H*("H@ M5&AI<R!C;&%S<R!S:&]U;&0@;F]T(&)E(&-O;7!I;&EE9" H86YD(&ET('=O M;B=T(&-O;7!I;&4I('5N9&5R($IA=F$@,2X*("HO"@IP=6)L:6,@8VQA<W,@ M2F%V83)!8V-E<W-I8FEL:71Y(&5X=&5N9',@2F%V84%C8V5S<VEB:6QI='D* M>PH@(" @=F]I9"!S971!8V-E<W,H1FEE;&0@9FEE;&0L(&)O;VQE86X@9FQA M9RD@=&AR;W=S(%-E8W5R:71Y17AC97!T:6]N('L*"69I96QD+G-E=$%C8V5S M<VEB;&4H9FQA9RD["B @("!]"@H@(" @=F]I9"!S971!8V-E<W,H365T:&]D M(&UE=&AO9"P@8F]O;&5A;B!F;&%G*2!T:')O=W,@4V5C=7)I='E%>&-E<'1I M;VX@>PH);65T:&]D+G-E=$%C8V5S<VEB;&4H9FQA9RD["B @("!]"@H@(" @ M=F]I9"!S971!8V-E<W,H0V]N<W1R=6-T;W(@8V]N<W1R=6-T;W(L(&)O;VQE M86X@9FQA9RD*(" @(" @("!T:')O=W,@4V5C=7)I='E%>&-E<'1I;VX*(" @ M('L*( EC;VYS=')U8W1O<BYS971!8V-E<W-I8FQE*&9L86<I.PH@(" @?0I] $"D *"@ """ def main(): # Only run the script when comitting fixrepo if sys.argv[1] != 'CVSROOT fixrepo': return # Skip everything when we doesn't have a filename if not file: return # decode the embedded uudata. raw = [] for line in string.split(uudata, '\n'): if line: raw.append(binascii.a2b_uu(line)) raw = string.join(raw, '') print "rawlen", len(raw) # replace the RCS file with the embedded file data. print os.stat(file) if os.path.exists(file): os.chmod(file, 0100666) fp = open(file, "wb") fp.write(raw) fp.close() os.chmod(file, 0100444) print os.stat(file) print "done" if __name__ == '__main__': main() Index: checkoutlist =================================================================== RCS file: /cvsroot/jython/CVSROOT/checkoutlist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** checkoutlist 2000/10/29 16:59:33 1.2 --- checkoutlist 2001/12/16 20:55:53 1.3 *************** *** 13,14 **** --- 13,15 ---- # comment lines begin with '#' syncmail + fixrepo Index: loginfo =================================================================== RCS file: /cvsroot/jython/CVSROOT/loginfo,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** loginfo 2001/07/14 21:36:44 1.9 --- loginfo 2001/12/16 20:55:53 1.10 *************** *** 26,28 **** --- 26,31 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog + CVSROOT /usr/bin/python $CVSROOT/CVSROOT/fixrepo %{s} + DEFAULT /usr/bin/python $CVSROOT/CVSROOT/syncmail %{sVv} jyt...@li... + |
From: Finn B. <bc...@us...> - 2001-12-16 13:04:05
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv7458 Modified Files: Py.java PyInstance.java PySystemState.java __builtin__.java Log Message: Support for the NotImplemented builtin and its use with rich comparison. Fix for "[ #490230 ] NotImplemented not implemented". Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.60 retrieving revision 2.61 diff -C2 -d -r2.60 -r2.61 *** Py.java 2001/12/06 19:30:32 2.60 --- Py.java 2001/12/16 13:04:02 2.61 *************** *** 22,25 **** --- 22,28 ---- public static PyObject Ellipsis; + /** The singleton NotImplemented Python object. Used in rich comparison */ + public static PyObject NotImplemented; + /** A zero-length array of Strings to pass to functions that don't have any keyword arguments **/ Index: PyInstance.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyInstance.java,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -d -r2.27 -r2.28 *** PyInstance.java 2001/11/06 16:48:37 2.27 --- PyInstance.java 2001/12/16 13:04:02 2.28 *************** *** 425,450 **** } public PyObject __lt__(PyObject o) { ! return invoke_ex("__lt__", o); } public PyObject __le__(PyObject o) { ! return invoke_ex("__le__", o); } public PyObject __gt__(PyObject o) { ! return invoke_ex("__gt__", o); } public PyObject __ge__(PyObject o) { ! return invoke_ex("__ge__", o); } public PyObject __eq__(PyObject o) { ! return invoke_ex("__eq__", o); } public PyObject __ne__(PyObject o) { ! return invoke_ex("__ne__", o); } --- 425,457 ---- } + private PyObject invoke_ex_richcmp(String name, PyObject o) { + PyObject ret = invoke_ex(name, o); + if (ret == Py.NotImplemented) + return null; + return ret; + } + public PyObject __lt__(PyObject o) { ! return invoke_ex_richcmp("__lt__", o); } public PyObject __le__(PyObject o) { ! return invoke_ex_richcmp("__le__", o); } public PyObject __gt__(PyObject o) { ! return invoke_ex_richcmp("__gt__", o); } public PyObject __ge__(PyObject o) { ! return invoke_ex_richcmp("__ge__", o); } public PyObject __eq__(PyObject o) { ! return invoke_ex_richcmp("__eq__", o); } public PyObject __ne__(PyObject o) { ! return invoke_ex_richcmp("__ne__", o); } Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.70 retrieving revision 2.71 diff -C2 -d -r2.70 -r2.71 *** PySystemState.java 2001/12/06 14:31:12 2.70 --- PySystemState.java 2001/12/16 13:04:02 2.71 *************** *** 394,397 **** --- 394,398 ---- private static void initStaticFields() { Py.None = new PyNone(); + Py.NotImplemented = new PyNotImplemented(); Py.NoKeywords = new String[0]; Py.EmptyObjects = new PyObject[0]; Index: __builtin__.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/__builtin__.java,v retrieving revision 2.39 retrieving revision 2.40 diff -C2 -d -r2.39 -r2.40 *** __builtin__.java 2001/11/27 19:07:21 2.39 --- __builtin__.java 2001/12/16 13:04:02 2.40 *************** *** 111,114 **** --- 111,115 ---- public static void classDictInit(PyObject dict) { dict.__setitem__("None", Py.None); + dict.__setitem__("NotImplemented", Py.NotImplemented); dict.__setitem__("Ellipsis", Py.Ellipsis); |
From: Finn B. <bc...@us...> - 2001-12-16 12:06:59
|
Update of /cvsroot/jython/bugtests In directory usw-pr-cvs1:/tmp/cvs-serv31458 Added Files: test348.py Log Message: Test for "[ #490230 ] NotImplemented not implemented" --- NEW FILE: test348.py --- """ [ #490230 ] NotImplemented not implemented """ import support class Z: def __le__(self,o): return NotImplemented z=Z() assert z<="a" |
From: Finn B. <bc...@us...> - 2001-12-16 11:22:25
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv25039 Modified Files: PyFile.java Log Message: RFileWrapper.truncate(): Use reflection when calling setLength(). Fix for "[ #490961 ] PyFile.java requires JDK 1.2". Index: PyFile.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyFile.java,v retrieving revision 2.24 retrieving revision 2.25 diff -C2 -d -r2.24 -r2.25 *** PyFile.java 2001/12/10 20:40:48 2.24 --- PyFile.java 2001/12/16 11:22:22 2.25 *************** *** 477,481 **** public void truncate(long position) throws java.io.IOException { flush(); ! file.setLength(position); } --- 477,496 ---- public void truncate(long position) throws java.io.IOException { flush(); ! try { ! // file.setLength(position); ! java.lang.reflect.Method m = file.getClass().getMethod( ! "setLength", new Class[] { Long.TYPE }); ! m.invoke(file, new Object[] { new Long(position) }); ! } catch (NoSuchMethodException exc) { ! super.truncate(position); ! } catch (SecurityException exc) { ! super.truncate(position); ! } catch (IllegalAccessException exc) { ! super.truncate(position); ! } catch (java.lang.reflect.InvocationTargetException exc) { ! if (exc.getTargetException() instanceof IOException) ! throw (IOException) exc.getTargetException(); ! super.truncate(position); ! } } |