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: <otm...@us...> - 2009-08-19 16:15:09
|
Revision: 6698 http://jython.svn.sourceforge.net/jython/?rev=6698&view=rev Author: otmarhumbel Date: 2009-08-19 16:15:00 +0000 (Wed, 19 Aug 2009) Log Message: ----------- add livetribe-jsr223-2.0.5.jar to the eclipse .classpath to enable compilation of the jsr223 packages Modified Paths: -------------- trunk/jython/.classpath Modified: trunk/jython/.classpath =================================================================== --- trunk/jython/.classpath 2009-08-19 14:31:17 UTC (rev 6697) +++ trunk/jython/.classpath 2009-08-19 16:15:00 UTC (rev 6698) @@ -21,5 +21,6 @@ <classpathentry kind="lib" path="extlibs/mockrunner-0.4.1/jar/jdom.jar"/> <classpathentry kind="lib" path="extlibs/mockrunner-0.4.1/lib/jdk1.5/j2ee1.3/mockrunner-servlet.jar"/> <classpathentry kind="lib" path="extlibs/jna.jar"/> + <classpathentry kind="lib" path="extlibs/livetribe-jsr223-2.0.5.jar"/> <classpathentry kind="output" path="build/classes"/> </classpath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-19 14:31:31
|
Revision: 6697 http://jython.svn.sourceforge.net/jython/?rev=6697&view=rev Author: fwierzbicki Date: 2009-08-19 14:31:17 +0000 (Wed, 19 Aug 2009) Log Message: ----------- Need to add the shell support for -J-classpath to NEWS Modified Paths: -------------- trunk/jython/NEWS Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-08-19 14:30:14 UTC (rev 6696) +++ trunk/jython/NEWS 2009-08-19 14:31:17 UTC (rev 6697) @@ -7,6 +7,7 @@ - Setting __javaname__ in classes subclassing Java classes or implementing Java interfaces sets the name of the produced proxy class. - Built in JSR 223 scripting engine, with LiveTribe JSR 223 implementation for JDK 5 + - Jython "-J-classpath cp_args_here" now works as expected for unix shell. Bugs Fixed - [ 645615 ] cannot import through symbolic links - [ 1366 ] parsing of lamda expression fails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-19 14:30:21
|
Revision: 6696 http://jython.svn.sourceforge.net/jython/?rev=6696&view=rev Author: fwierzbicki Date: 2009-08-19 14:30:14 +0000 (Wed, 19 Aug 2009) Log Message: ----------- Added support for "jython -J-classpath cp_arg_goes_here" in jython unix shell. Modified Paths: -------------- trunk/jython/src/shell/jython Modified: trunk/jython/src/shell/jython =================================================================== --- trunk/jython/src/shell/jython 2009-08-19 13:23:14 UTC (rev 6695) +++ trunk/jython/src/shell/jython 2009-08-19 14:30:14 UTC (rev 6696) @@ -135,6 +135,12 @@ $JAVA_CMD -X echo "(Prepend -J in front of these options when using 'jython' command)" exit + elif [ "${val}" = "-classpath" ]; then + CP="$CP$CP_DELIMITER$2" + shift + elif [ "${val}" = "-cp" ]; then + CP="$CP$CP_DELIMITER$2" + shift else if [ "${val:0:16}" = "-Dfile.encoding=" ]; then JAVA_ENCODING=$val This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-19 13:23:28
|
Revision: 6695 http://jython.svn.sourceforge.net/jython/?rev=6695&view=rev Author: fwierzbicki Date: 2009-08-19 13:23:14 +0000 (Wed, 19 Aug 2009) Log Message: ----------- A simple class that allows a jarred up Jython app with a __run__.py to run with java -jar myapp.jar as long as it is specified as the main class in the manifest. Added Paths: ----------- trunk/jython/src/org/python/util/JarRunner.java Added: trunk/jython/src/org/python/util/JarRunner.java =================================================================== --- trunk/jython/src/org/python/util/JarRunner.java (rev 0) +++ trunk/jython/src/org/python/util/JarRunner.java 2009-08-19 13:23:14 UTC (rev 6695) @@ -0,0 +1,33 @@ +package org.python.util; + +import org.python.core.imp; +import org.python.core.PySystemState; + +/** + * JarRunner initializes sys (PySystemState), passing args in (including the + * name "__run__" as arg 0 for consistancy with Python expectations), and + * import __run__. It is intended to be used to allow an application jarred up + * with Jython's runtime to run like "java -jar foo.jar". It requires a + * __run__.py in the jar that will execute the program, and the following entry + * in the manifest: + * + * Main-Class: org.python.util.JarRunner + * + * XXX: For the moment it should be considered experimental, but it is simple + * enough that I expect to be able to remove this warning pretty quickly. + */ +public class JarRunner { + + public static void run(String[] args) { + final String runner = "__run__"; + String[] argv = new String[args.length + 1]; + argv[0] = runner; + System.arraycopy(args, 0, argv, 1, args.length); + PySystemState.initialize(PySystemState.getBaseProperties(), null, argv); + imp.load(runner); + } + + public static void main(String[] args) { + run(args); + } +} Property changes on: trunk/jython/src/org/python/util/JarRunner.java ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-18 02:44:11
|
Revision: 6694 http://jython.svn.sourceforge.net/jython/?rev=6694&view=rev Author: pjenvey Date: 2009-08-18 02:44:03 +0000 (Tue, 18 Aug 2009) Log Message: ----------- add __unicode__ Modified Paths: -------------- trunk/jython/src/com/ziclix/python/sql/PyStatement.java Modified: trunk/jython/src/com/ziclix/python/sql/PyStatement.java =================================================================== --- trunk/jython/src/com/ziclix/python/sql/PyStatement.java 2009-08-18 02:19:12 UTC (rev 6693) +++ trunk/jython/src/com/ziclix/python/sql/PyStatement.java 2009-08-18 02:44:03 UTC (rev 6694) @@ -8,11 +8,13 @@ */ package com.ziclix.python.sql; +import org.python.core.codecs; import org.python.core.Py; import org.python.core.PyException; import org.python.core.PyList; import org.python.core.PyObject; import org.python.core.PyString; +import org.python.core.PyUnicode; import java.sql.CallableStatement; import java.sql.PreparedStatement; @@ -92,22 +94,27 @@ } @Override - public PyString __str__() { + public PyUnicode __unicode__() { if (sql instanceof String) { - return Py.newString((String) sql); + return Py.newUnicode((String) sql); } else if (sql instanceof Procedure) { try { - return Py.newString(((Procedure) sql).toSql()); + return Py.newUnicode(((Procedure) sql).toSql()); } catch (SQLException e) { throw zxJDBC.makeException(e); } } - return super.__str__(); + return super.__unicode__(); } @Override + public PyString __str__() { + return Py.newString(__unicode__().encode(codecs.getDefaultEncoding(), "replace")); + } + + @Override public String toString() { - return String.format("<PyStatement object at %s for [%s]", Py.idstr(this), __str__()); + return String.format("<PyStatement object at %s for [%s]", Py.idstr(this), __unicode__()); } /** @@ -178,7 +185,6 @@ Fetch fetch = cursor.fetch; switch (style) { - case STATEMENT_STATIC: if (statement.execute((String) sql)) { fetch.add(statement.getResultSet()); @@ -203,7 +209,7 @@ fetch.add(callableStatement, (Procedure) sql, params); break; - default : + default: throw zxJDBC.makeException(zxJDBC.ProgrammingError, zxJDBC.getString("invalidStyle")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-18 02:19:30
|
Revision: 6693 http://jython.svn.sourceforge.net/jython/?rev=6693&view=rev Author: pjenvey Date: 2009-08-18 02:19:12 +0000 (Tue, 18 Aug 2009) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/jython/src/com/ziclix/python/sql/PyStatement.java Modified: trunk/jython/src/com/ziclix/python/sql/PyStatement.java =================================================================== --- trunk/jython/src/com/ziclix/python/sql/PyStatement.java 2009-08-17 18:41:12 UTC (rev 6692) +++ trunk/jython/src/com/ziclix/python/sql/PyStatement.java 2009-08-18 02:19:12 UTC (rev 6693) @@ -10,7 +10,6 @@ import org.python.core.Py; import org.python.core.PyException; -import org.python.core.PyInteger; import org.python.core.PyList; import org.python.core.PyObject; import org.python.core.PyString; @@ -28,41 +27,46 @@ */ public class PyStatement extends PyObject { - /** - * Field STATEMENT_STATIC - */ + /** Denotes a simple Statement with no parameters. */ public static final int STATEMENT_STATIC = 2; - /** - * Field STATEMENT_PREPARED - */ + /** Denotes a PreparedStatement either explicitly created by the user, or from a + * cursor (due to the presence of bind parameters). */ public static final int STATEMENT_PREPARED = 4; - /** - * Field STATEMENT_CALLABLE - */ + /** Denotes a stored procedure call. */ public static final int STATEMENT_CALLABLE = 8; - /** - * Field style - */ + /** One of the above styles. */ private int style; - /** - * Field sql - */ + /** The underlying sql, a String or a Procedure. */ private Object sql; - /** - * Field closed - */ + /** Whether this statement is closed. */ private boolean closed; - /** - * Field statement - */ + /** The underlying java.sql.Statement. */ Statement statement; + /** Field __methods__ */ + protected static PyList __methods__; + + /** Field __members__ */ + protected static PyList __members__; + + static { + PyObject[] m = new PyObject[1]; + + m[0] = new PyString("close"); + __methods__ = new PyList(m); + m = new PyObject[3]; + m[0] = new PyString("style"); + m[1] = new PyString("closed"); + m[2] = new PyString("__statement__"); + __members__ = new PyList(m); + } + /** * Constructor PyStatement * @@ -71,11 +75,10 @@ * @param style */ public PyStatement(Statement statement, Object sql, int style) { - + this.statement = statement; this.sql = sql; this.style = style; - this.closed = false; - this.statement = statement; + closed = false; } /** @@ -88,35 +91,8 @@ this(statement, procedure, STATEMENT_CALLABLE); } - /** - * Field __methods__ - */ - protected static PyList __methods__; - - /** - * Field __members__ - */ - protected static PyList __members__; - - static { - PyObject[] m = new PyObject[1]; - - m[0] = new PyString("close"); - __methods__ = new PyList(m); - m = new PyObject[3]; - m[0] = new PyString("style"); - m[1] = new PyString("closed"); - m[2] = new PyString("__statement__"); - __members__ = new PyList(m); - } - - /** - * Method __str__ - * - * @return PyString - */ + @Override public PyString __str__() { - if (sql instanceof String) { return Py.newString((String) sql); } else if (sql instanceof Procedure) { @@ -126,23 +102,12 @@ throw zxJDBC.makeException(e); } } - return super.__str__(); } @Override - public PyString __repr__() { - return Py.newString(String.format("<PyStatement object at %s for [%s]", Py.idstr(this), - __str__())); - } - - /** - * Method toString - * - * @return String - */ public String toString() { - return __repr__().toString(); + return String.format("<PyStatement object at %s for [%s]", Py.idstr(this), __str__()); } /** @@ -151,8 +116,8 @@ * @param name * @return the attribute for the given name */ + @Override public PyObject __findattr_ex__(String name) { - if ("style".equals(name)) { return Py.newInteger(style); } else if ("closed".equals(name)) { @@ -174,9 +139,11 @@ * @param dict */ static public void classDictInit(PyObject dict) { + PyObject version = + Py.newString("$Revision$").__getslice__(Py.newInteger(11), + Py.newInteger(-2)); + dict.__setitem__("__version__", version); - dict.__setitem__("__version__", Py.newString("$Revision$").__getslice__(Py.newInteger(11), Py.newInteger(-2), null)); - // hide from python dict.__setitem__("classDictInit", null); dict.__setitem__("statement", null); @@ -203,25 +170,23 @@ * @throws SQLException */ public void execute(PyCursor cursor, PyObject params, PyObject bindings) throws SQLException { - - if (this.closed) { + if (closed) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "statement is closed"); } - this.prepare(cursor, params, bindings); + prepare(cursor, params, bindings); Fetch fetch = cursor.fetch; + switch (style) { - switch (this.style) { - case STATEMENT_STATIC: - if (this.statement.execute((String) this.sql)) { - fetch.add(this.statement.getResultSet()); + if (statement.execute((String) sql)) { + fetch.add(statement.getResultSet()); } break; case STATEMENT_PREPARED: - final PreparedStatement preparedStatement = (PreparedStatement) this.statement; + final PreparedStatement preparedStatement = (PreparedStatement) statement; if (preparedStatement.execute()) { fetch.add(preparedStatement.getResultSet()); @@ -229,7 +194,7 @@ break; case STATEMENT_CALLABLE: - final CallableStatement callableStatement = (CallableStatement) this.statement; + final CallableStatement callableStatement = (CallableStatement) statement; if (callableStatement.execute()) { fetch.add(callableStatement.getResultSet()); @@ -239,7 +204,8 @@ break; default : - throw zxJDBC.makeException(zxJDBC.ProgrammingError, zxJDBC.getString("invalidStyle")); + throw zxJDBC.makeException(zxJDBC.ProgrammingError, + zxJDBC.getString("invalidStyle")); } } @@ -252,8 +218,7 @@ * @throws SQLException */ private void prepare(PyCursor cursor, PyObject params, PyObject bindings) throws SQLException { - - if ((params == Py.None) || (this.style == STATEMENT_STATIC)) { + if (params == Py.None || style == STATEMENT_STATIC) { return; } @@ -261,63 +226,57 @@ final DataHandler datahandler = cursor.datahandler; int columns = 0, column = 0, index = params.__len__(); final PreparedStatement preparedStatement = (PreparedStatement) statement; - final Procedure procedure = (this.style == STATEMENT_CALLABLE) ? (Procedure) this.sql : null; + final Procedure procedure = style == STATEMENT_CALLABLE ? (Procedure) sql : null; - if (this.style != STATEMENT_CALLABLE) { + if (style != STATEMENT_CALLABLE) { columns = params.__len__(); - // clear the statement so all new bindings take affect only if not a callproc // this is because Procedure already registered the OUT parameters and we // don't want to lose those preparedStatement.clearParameters(); } else { - columns = (procedure.columns == Py.None) ? 0 : procedure.columns.__len__(); + columns = procedure.columns == Py.None ? 0 : procedure.columns.__len__(); } // count backwards through all the columns while (columns-- > 0) { column = columns + 1; - if ((procedure != null) && (!procedure.isInput(column))) { + if (procedure != null && !procedure.isInput(column)) { continue; } // working from right to left PyObject param = params.__getitem__(--index); - if (bindings != Py.None) { PyObject binding = bindings.__finditem__(Py.newInteger(index)); if (binding != null) { try { int bindingValue = binding.asInt(); - datahandler.setJDBCObject(preparedStatement, column, param, bindingValue); } catch (PyException e) { - throw zxJDBC.makeException(zxJDBC.ProgrammingError, zxJDBC.getString("bindingValue")); + throw zxJDBC.makeException(zxJDBC.ProgrammingError, + zxJDBC.getString("bindingValue")); } - continue; } } datahandler.setJDBCObject(preparedStatement, column, param); } - - return; } /** * Method close */ public void close() { - try { - this.statement.close(); + statement.close(); } catch (SQLException e) { throw zxJDBC.makeException(e); } finally { - this.closed = true; + closed = true; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-17 18:41:20
|
Revision: 6692 http://jython.svn.sourceforge.net/jython/?rev=6692&view=rev Author: fwierzbicki Date: 2009-08-17 18:41:12 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Added "devclean": deletes everything but the generated antlr files, cachedir, and Lib. Modified Paths: -------------- trunk/jython/build.xml Modified: trunk/jython/build.xml =================================================================== --- trunk/jython/build.xml 2009-08-17 13:25:59 UTC (rev 6691) +++ trunk/jython/build.xml 2009-08-17 18:41:12 UTC (rev 6692) @@ -108,7 +108,7 @@ <target name="full-build" depends="full-check, install" description="a full build with svn checkout" /> <target name="needed-check" unless="full-build"> - <uptodate property="antlr.notneeded" targetfile="${dist.dir}/${jython.dev.jar}"> + <uptodate property="antlr.notneeded" targetfile="${gensrc.dir}/org/python/antlr/PythonParser.java"> <srcfiles dir="grammar" includes="*.g" /> </uptodate> </target> @@ -307,6 +307,23 @@ </delete> </target> + <target name="devclean" depends="init" + description="clean up build working directories, without deleting antlr files, cachedir, or Lib."> + + <delete includeemptydirs="true" failonerror="false"> + <fileset dir="${output.dir}" includes="**/*" excludes="gensrc/**"/> + </delete> + <!-- deletes all files and subdirectories of ${dist.dir}, without ${dist.dir} itself. --> + <delete includeemptydirs="true" failonerror="false"> + <fileset dir="${dist.dir}" includes="**/*" excludes="cachedir/**,Lib/**"/> + </delete> + <!-- delete the installation .jar file from ${work.dir}, but no other files --> + <delete failonerror="false"> + <fileset dir="${work.dir}" includes="jython*.jar" /> + </delete> + </target> + + <!-- clean svn.checkout.dir if we really checkout --> <target name="clean-checkout-dir" if="do.checkout"> <delete includeemptydirs="true" failonerror="false"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-17 13:26:06
|
Revision: 6691 http://jython.svn.sourceforge.net/jython/?rev=6691&view=rev Author: fwierzbicki Date: 2009-08-17 13:25:59 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Better BinOp col_offsets. Modified Paths: -------------- trunk/jython/grammar/Python.g trunk/jython/src/org/python/antlr/GrammarActions.java Modified: trunk/jython/grammar/Python.g =================================================================== --- trunk/jython/grammar/Python.g 2009-08-17 03:15:31 UTC (rev 6690) +++ trunk/jython/grammar/Python.g 2009-08-17 13:25:59 UTC (rev 6691) @@ -1149,7 +1149,11 @@ @after { $leftTok = $left.lparen; if ($op != null) { - $expr.tree = actions.makeBinOp($left.tree, operatorType.BitOr, $right); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $expr.tree = actions.makeBinOp(tok, $left.tree, operatorType.BitOr, $right); } } : left=xor_expr @@ -1166,7 +1170,11 @@ returns [Token lparen = null] @after { if ($op != null) { - $xor_expr.tree = actions.makeBinOp($left.tree, operatorType.BitXor, $right); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $xor_expr.tree = actions.makeBinOp(tok, $left.tree, operatorType.BitXor, $right); } $lparen = $left.lparen; } @@ -1183,7 +1191,11 @@ returns [Token lparen = null] @after { if ($op != null) { - $and_expr.tree = actions.makeBinOp($left.tree, operatorType.BitAnd, $right); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $and_expr.tree = actions.makeBinOp(tok, $left.tree, operatorType.BitAnd, $right); } $lparen = $left.lparen; } @@ -1204,7 +1216,11 @@ } @after { if (!ops.isEmpty()) { - $shift_expr.tree = actions.makeBinOp($left.start, $left.tree, ops, $right, toks); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $shift_expr.tree = actions.makeBinOp(tok, $left.tree, ops, $right, toks); } $lparen = $left.lparen; } @@ -1237,7 +1253,11 @@ } @after { if (!ops.isEmpty()) { - $arith_expr.tree = actions.makeBinOp($left.start, $left.tree, ops, $right, toks); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $arith_expr.tree = actions.makeBinOp(tok, $left.tree, ops, $right, toks); } $lparen = $left.lparen; } @@ -1364,7 +1384,7 @@ if ($d != null) { List right = new ArrayList(); right.add($factor.tree); - $etype = actions.makeBinOp($etype, operatorType.Pow, right); + $etype = actions.makeBinOp($atom.start, $etype, operatorType.Pow, right); } } ; Modified: trunk/jython/src/org/python/antlr/GrammarActions.java =================================================================== --- trunk/jython/src/org/python/antlr/GrammarActions.java 2009-08-17 03:15:31 UTC (rev 6690) +++ trunk/jython/src/org/python/antlr/GrammarActions.java 2009-08-17 13:25:59 UTC (rev 6691) @@ -649,8 +649,8 @@ return new BoolOp(t, op, castExprs(values)); } - BinOp makeBinOp(PythonTree left, operatorType op, List rights) { - BinOp current = new BinOp(left, castExpr(left), op, castExpr(rights.get(0))); + BinOp makeBinOp(Token t, PythonTree left, operatorType op, List rights) { + BinOp current = new BinOp(t, castExpr(left), op, castExpr(rights.get(0))); for (int i = 1; i< rights.size(); i++) { expr right = castExpr(rights.get(i)); current = new BinOp(left, current, op, right); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-17 03:15:37
|
Revision: 6690 http://jython.svn.sourceforge.net/jython/?rev=6690&view=rev Author: fwierzbicki Date: 2009-08-17 03:15:31 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Better match of CPython col_offset for factors with parens like: (a - b) * c Modified Paths: -------------- trunk/jython/Lib/test/test_ast.py trunk/jython/grammar/Python.g trunk/jython/src/org/python/antlr/GrammarActions.java Modified: trunk/jython/Lib/test/test_ast.py =================================================================== --- trunk/jython/Lib/test/test_ast.py 2009-08-17 02:30:53 UTC (rev 6689) +++ trunk/jython/Lib/test/test_ast.py 2009-08-17 03:15:31 UTC (rev 6690) @@ -67,11 +67,12 @@ # Parens and BoolOp "(a == '') and b", "not (a == '') or b", + # Parens and BinOp + "(a - b) * c", # for statements with naked tuples "for a,b in c: pass", "[(a,b) for a,b in c]", "((a,b) for a,b in c)", - ] # These are compiled through "single" @@ -336,6 +337,7 @@ ('Module', [('Continue', (1, 0))]), ('Module', [('Expr', (1, 0), ('BoolOp', (1, 0), ('And',), [('Compare', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('Eq',)], [('Str', (1, 6), '')]), ('Name', (1, 14), 'b', ('Load',))]))]), ('Module', [('Expr', (1, 0), ('BoolOp', (1, 0), ('Or',), [('UnaryOp', (1, 0), ('Not',), ('Compare', (1, 5), ('Name', (1, 5), 'a', ('Load',)), [('Eq',)], [('Str', (1, 10), '')])), ('Name', (1, 17), 'b', ('Load',))]))]), +('Module', [('Expr', (1, 0), ('BinOp', (1, 0), ('BinOp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), ('Sub',), ('Name', (1, 5), 'b', ('Load',))), ('Mult',), ('Name', (1, 10), 'c', ('Load',))))]), ('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)), ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load',)), [('Pass', (1, 14))], [])]), ('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), ('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), Modified: trunk/jython/grammar/Python.g =================================================================== --- trunk/jython/grammar/Python.g 2009-08-17 02:30:53 UTC (rev 6689) +++ trunk/jython/grammar/Python.g 2009-08-17 03:15:31 UTC (rev 6690) @@ -1204,7 +1204,7 @@ } @after { if (!ops.isEmpty()) { - $shift_expr.tree = actions.makeBinOp($left.tree, ops, $right, toks); + $shift_expr.tree = actions.makeBinOp($left.start, $left.tree, ops, $right, toks); } $lparen = $left.lparen; } @@ -1237,7 +1237,7 @@ } @after { if (!ops.isEmpty()) { - $arith_expr.tree = actions.makeBinOp($left.tree, ops, $right, toks); + $arith_expr.tree = actions.makeBinOp($left.start, $left.tree, ops, $right, toks); } $lparen = $left.lparen; } @@ -1279,7 +1279,11 @@ @after { $lparen = $left.lparen; if (!ops.isEmpty()) { - $term.tree = actions.makeBinOp($left.tree, ops, $right, toks); + Token tok = $left.start; + if ($left.lparen != null) { + tok = $left.lparen; + } + $term.tree = actions.makeBinOp(tok, $left.tree, ops, $right, toks); } } : left=factor Modified: trunk/jython/src/org/python/antlr/GrammarActions.java =================================================================== --- trunk/jython/src/org/python/antlr/GrammarActions.java 2009-08-17 02:30:53 UTC (rev 6689) +++ trunk/jython/src/org/python/antlr/GrammarActions.java 2009-08-17 03:15:31 UTC (rev 6690) @@ -658,8 +658,8 @@ return current; } - BinOp makeBinOp(PythonTree left, List ops, List rights, List toks) { - BinOp current = new BinOp(left, castExpr(left), (operatorType)ops.get(0), castExpr(rights.get(0))); + BinOp makeBinOp(Token t, PythonTree left, List ops, List rights, List toks) { + BinOp current = new BinOp(t, castExpr(left), (operatorType)ops.get(0), castExpr(rights.get(0))); for (int i = 1; i< rights.size(); i++) { expr right = castExpr(rights.get(i)); operatorType op = (operatorType)ops.get(i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-17 02:31:00
|
Revision: 6689 http://jython.svn.sourceforge.net/jython/?rev=6689&view=rev Author: fwierzbicki Date: 2009-08-17 02:30:53 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Removed dynamic scope on expr::lparen. Need to pass the lparen info up to each rule anyway. Modified Paths: -------------- trunk/jython/grammar/Python.g Modified: trunk/jython/grammar/Python.g =================================================================== --- trunk/jython/grammar/Python.g 2009-08-17 02:29:34 UTC (rev 6688) +++ trunk/jython/grammar/Python.g 2009-08-17 02:30:53 UTC (rev 6689) @@ -1142,14 +1142,12 @@ [expr_contextType ect] returns [Token leftTok] scope { expr_contextType ctype; - Token lparen; } @init { $expr::ctype = ect; - $expr::lparen = null; } @after { - $leftTok = $expr::lparen; + $leftTok = $left.lparen; if ($op != null) { $expr.tree = actions.makeBinOp($left.tree, operatorType.BitOr, $right); } @@ -1165,10 +1163,12 @@ //xor_expr: and_expr ('^' and_expr)* xor_expr + returns [Token lparen = null] @after { if ($op != null) { $xor_expr.tree = actions.makeBinOp($left.tree, operatorType.BitXor, $right); } + $lparen = $left.lparen; } : left=and_expr ( (op=CIRCUMFLEX right+=and_expr @@ -1180,10 +1180,12 @@ //and_expr: shift_expr ('&' shift_expr)* and_expr + returns [Token lparen = null] @after { if ($op != null) { $and_expr.tree = actions.makeBinOp($left.tree, operatorType.BitAnd, $right); } + $lparen = $left.lparen; } : left=shift_expr ( (op=AMPER right+=shift_expr @@ -1195,6 +1197,7 @@ //shift_expr: arith_expr (('<<'|'>>') arith_expr)* shift_expr + returns [Token lparen = null] @init { List ops = new ArrayList(); List toks = new ArrayList(); @@ -1203,6 +1206,7 @@ if (!ops.isEmpty()) { $shift_expr.tree = actions.makeBinOp($left.tree, ops, $right, toks); } + $lparen = $left.lparen; } : left=arith_expr ( ( shift_op right+=arith_expr @@ -1226,6 +1230,7 @@ //arith_expr: term (('+'|'-') term)* arith_expr + returns [Token lparen = null] @init { List ops = new ArrayList(); List toks = new ArrayList(); @@ -1234,6 +1239,7 @@ if (!ops.isEmpty()) { $arith_expr.tree = actions.makeBinOp($left.tree, ops, $right, toks); } + $lparen = $left.lparen; } : left=term ( (arith_op right+=term @@ -1265,11 +1271,13 @@ //term: factor (('*'|'/'|'%'|'//') factor)* term + returns [Token lparen = null] @init { List ops = new ArrayList(); List toks = new ArrayList(); } @after { + $lparen = $left.lparen; if (!ops.isEmpty()) { $term.tree = actions.makeBinOp($left.tree, ops, $right, toks); } @@ -1300,7 +1308,7 @@ //factor: ('+'|'-'|'~') factor | power factor - returns [expr etype] + returns [expr etype, Token lparen = null] @after { $factor.tree = $etype; } @@ -1311,17 +1319,21 @@ | TILDE t=factor {$etype = new UnaryOp($TILDE, unaryopType.Invert, $t.etype);} | power - {$etype = actions.castExpr($power.tree);} + { + $etype = actions.castExpr($power.tree); + $lparen = $power.lparen; + } ; //power: atom trailer* ['**' factor] power - returns [expr etype] + returns [expr etype, Token lparen = null] @after { $power.tree = $etype; } : atom (t+=trailer[$atom.start, $atom.tree])* (options {greedy=true;}:d=DOUBLESTAR factor)? { + $lparen = $atom.lparen; //XXX: This could be better. $etype = actions.castExpr($atom.tree); if ($t != null) { @@ -1359,7 +1371,8 @@ // '`' testlist1 '`' | // NAME | NUMBER | STRING+) atom - : LPAREN {$expr::lparen = $LPAREN;} + returns [Token lparen = null] + : LPAREN {$lparen = $LPAREN;} ( yield_expr -> yield_expr | testlist_gexp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-17 02:29:41
|
Revision: 6688 http://jython.svn.sourceforge.net/jython/?rev=6688&view=rev Author: fwierzbicki Date: 2009-08-17 02:29:34 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Added ast tests for "naked tuples" in for statements like: for a,b in c: pass Modified Paths: -------------- trunk/jython/Lib/test/test_ast.py Modified: trunk/jython/Lib/test/test_ast.py =================================================================== --- trunk/jython/Lib/test/test_ast.py 2009-08-17 01:47:30 UTC (rev 6687) +++ trunk/jython/Lib/test/test_ast.py 2009-08-17 02:29:34 UTC (rev 6688) @@ -67,6 +67,11 @@ # Parens and BoolOp "(a == '') and b", "not (a == '') or b", + # for statements with naked tuples + "for a,b in c: pass", + "[(a,b) for a,b in c]", + "((a,b) for a,b in c)", + ] # These are compiled through "single" @@ -331,6 +336,9 @@ ('Module', [('Continue', (1, 0))]), ('Module', [('Expr', (1, 0), ('BoolOp', (1, 0), ('And',), [('Compare', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('Eq',)], [('Str', (1, 6), '')]), ('Name', (1, 14), 'b', ('Load',))]))]), ('Module', [('Expr', (1, 0), ('BoolOp', (1, 0), ('Or',), [('UnaryOp', (1, 0), ('Not',), ('Compare', (1, 5), ('Name', (1, 5), 'a', ('Load',)), [('Eq',)], [('Str', (1, 10), '')])), ('Name', (1, 17), 'b', ('Load',))]))]), +('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)), ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load',)), [('Pass', (1, 14))], [])]), +('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), +('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), ] single_results = [ ('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',), ('Num', (1, 2), 2)))]), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-17 01:47:49
|
Revision: 6687 http://jython.svn.sourceforge.net/jython/?rev=6687&view=rev Author: pjenvey Date: 2009-08-17 01:47:30 +0000 (Mon, 17 Aug 2009) Log Message: ----------- quiet warnings Modified Paths: -------------- trunk/jython/src/org/python/core/util/ByteSwapper.java trunk/jython/src/org/python/core/util/ConcurrentHashSet.java Modified: trunk/jython/src/org/python/core/util/ByteSwapper.java =================================================================== --- trunk/jython/src/org/python/core/util/ByteSwapper.java 2009-08-17 01:43:09 UTC (rev 6686) +++ trunk/jython/src/org/python/core/util/ByteSwapper.java 2009-08-17 01:47:30 UTC (rev 6687) @@ -42,7 +42,7 @@ * @param array the input array for type sensitive byte swapping. */ public static void swap(Object array) { - Class arrayType = array.getClass().getComponentType(); + Class<?> arrayType = array.getClass().getComponentType(); if (arrayType.isPrimitive()) { if (arrayType == Boolean.TYPE) { @@ -89,8 +89,8 @@ b6 = (tmp >> 40) & 0xff; b7 = (tmp >> 48) & 0xff; b8 = (tmp >> 56) & 0xff; - tmp = b1 << 56 | b2 << 48 | b3 << 40 | b4 << 32 | b5 << 24 - | b6 << 16 | b7 << 8 | b8 << 0; + tmp = b1 << 56 | b2 << 48 | b3 << 40 | b4 << 32 | b5 << 24 | b6 << 16 | b7 << 8 + | b8 << 0; dtmp = Double.longBitsToDouble(tmp); Array.setDouble(array, i, dtmp); @@ -167,8 +167,8 @@ b6 = (tmp >> 40) & 0xff; b7 = (tmp >> 48) & 0xff; b8 = (tmp >> 56) & 0xff; - tmp = b1 << 56 | b2 << 48 | b3 << 40 | b4 << 32 | b5 << 24 - | b6 << 16 | b7 << 8 | b8 << 0; + tmp = b1 << 56 | b2 << 48 | b3 << 40 | b4 << 32 | b5 << 24 | b6 << 16 | b7 << 8 + | b8 << 0; Array.setLong(array, i, tmp); } Modified: trunk/jython/src/org/python/core/util/ConcurrentHashSet.java =================================================================== --- trunk/jython/src/org/python/core/util/ConcurrentHashSet.java 2009-08-17 01:43:09 UTC (rev 6686) +++ trunk/jython/src/org/python/core/util/ConcurrentHashSet.java 2009-08-17 01:47:30 UTC (rev 6687) @@ -40,54 +40,67 @@ keySet = map.keySet(); } + @Override public int size() { return map.size(); } + @Override public boolean isEmpty() { return map.isEmpty(); } + @Override public boolean contains(Object o) { return map.containsKey(o); } + @Override public Iterator<E> iterator() { return keySet.iterator(); } + @Override public Object[] toArray() { return keySet.toArray(); } + @Override public <T> T[] toArray(T[] a) { return keySet.toArray(a); } + @Override public boolean add(E e) { return map.put(e, PRESENT) == null; } + @Override public boolean remove(Object o) { return map.remove(o) != null; } + @Override public boolean removeAll(Collection<?> c) { return keySet.removeAll(c); } + @Override public boolean retainAll(Collection<?> c) { return keySet.retainAll(c); } + @Override public void clear() { map.clear(); } + @Override public boolean equals(Object o) { return keySet.equals(o); } + @Override public int hashCode() { return keySet.hashCode(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-17 01:43:26
|
Revision: 6686 http://jython.svn.sourceforge.net/jython/?rev=6686&view=rev Author: pjenvey Date: 2009-08-17 01:43:09 +0000 (Mon, 17 Aug 2009) Log Message: ----------- fix writelines' handling of non-strs and not resetting softspace Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2009-08-17 00:17:36 UTC (rev 6685) +++ trunk/jython/src/org/python/core/PyFile.java 2009-08-17 01:43:09 UTC (rev 6686) @@ -355,18 +355,7 @@ @ExposedMethod(doc = BuiltinDocs.file_write_doc) final void file_write(PyObject obj) { - if (obj instanceof PyUnicode) { - // Call __str__ on unicode objects to encode them before writing - file_write(obj.__str__().string); - } else if (obj instanceof PyString) { - file_write(((PyString)obj).string); - } else if (binary && obj instanceof PyArray) { - file_write(((PyArray)obj).tostring()); - } else { - throw Py.TypeError(String.format("argument 1 must be string or %sbuffer, not %.200s", - binary ? "" : "read-only character ", - obj.getType().fastGetName())); - } + file_write(asWritable(obj, null)); } final synchronized void file_write(String string) { @@ -383,13 +372,9 @@ final synchronized void file_writelines(PyObject lines) { checkClosed(); PyObject iter = Py.iter(lines, "writelines() requires an iterable argument"); - - PyObject item = null; - while ((item = iter.__iternext__()) != null) { - if (!(item instanceof PyString)) { - throw Py.TypeError("writelines() argument must be a sequence of strings"); - } - file.write(item.toString()); + for (PyObject item = null; (item = iter.__iternext__()) != null;) { + softspace = false; + file.write(asWritable(item, "writelines() argument must be a sequence of strings")); } } @@ -397,6 +382,25 @@ file_writelines(lines); } + /** + * Return a String for writing to the underlying file from obj. + */ + private String asWritable(PyObject obj, String message) { + if (obj instanceof PyUnicode) { + return ((PyUnicode)obj).encode(); + } else if (obj instanceof PyString) { + return ((PyString)obj).string; + } else if (binary && obj instanceof PyArray) { + return ((PyArray)obj).tostring(); + } + if (message == null) { + message = String.format("argument 1 must be string or %sbuffer, not %.200s", + binary ? "" : "read-only character ", + obj.getType().fastGetName()); + } + throw Py.TypeError(message); + } + @ExposedMethod(doc = BuiltinDocs.file_tell_doc) final synchronized long file_tell() { checkClosed(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Frank W. <fwi...@gm...> - 2009-08-17 00:23:29
|
Philip, Thanks for the improvements! -Frank On Sun, Aug 16, 2009 at 6:40 PM, <pj...@us...> wrote: > Revision: 6683 > http://jython.svn.sourceforge.net/jython/?rev=6683&view=rev > Author: pjenvey > Date: 2009-08-16 22:40:47 +0000 (Sun, 16 Aug 2009) > > Log Message: > ----------- > restrict array writes to binary mode > > Modified Paths: > -------------- > trunk/jython/src/org/python/core/PyFile.java > > Modified: trunk/jython/src/org/python/core/PyFile.java > =================================================================== > --- trunk/jython/src/org/python/core/PyFile.java 2009-08-16 22:25:58 UTC (rev 6682) > +++ trunk/jython/src/org/python/core/PyFile.java 2009-08-16 22:40:47 UTC (rev 6683) > @@ -354,12 +354,12 @@ > file_write(o.__str__().string); > } else if (o instanceof PyString) { > file_write(((PyString)o).string); > - } else if (o instanceof PyArray) { > - ((PyArray)o).tofile(this); > + } else if (binary && o instanceof PyArray) { > + file_write(((PyArray)o).tostring()); > } else { > - //XXX: Match CPython's error message better > - // "argument 1 must be string or read-only buffer, not {type}" > - throw Py.TypeError("write requires a string or read-only buffer as its argument"); > + throw Py.TypeError(String.format("argument 1 must be string or %sbuffer, not %.200s", > + binary ? "" : "read-only character ", > + o.getType().fastGetName())); > } > } > > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Jython-checkins mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-checkins > |
From: <cg...@us...> - 2009-08-17 00:17:42
|
Revision: 6685 http://jython.svn.sourceforge.net/jython/?rev=6685&view=rev Author: cgroves Date: 2009-08-17 00:17:36 +0000 (Mon, 17 Aug 2009) Log Message: ----------- WHERE_PLACEHOLDER could hold on to a reference to a type for a while, and it's causing static initialization problems. Screw using a static array and just pass in null if we don't want to know where the item was found. Modified Paths: -------------- trunk/jython/src/org/python/core/PyType.java Modified: trunk/jython/src/org/python/core/PyType.java =================================================================== --- trunk/jython/src/org/python/core/PyType.java 2009-08-16 23:39:05 UTC (rev 6684) +++ trunk/jython/src/org/python/core/PyType.java 2009-08-17 00:17:36 UTC (rev 6685) @@ -90,9 +90,6 @@ /** Mapping of Java classes to their TypeBuilders. */ private static Map<Class<?>, TypeBuilder> classToBuilder; - /** Used by {@link #lookup} to call {@link #lookup_where} without allocating an array */ - private static final PyObject[] WHERE_PLACEHOLDER = new PyObject[1]; - protected PyType(PyType subtype) { super(subtype); } @@ -1046,7 +1043,7 @@ * @return found object or null */ public PyObject lookup(String name) { - return lookup_where(name, WHERE_PLACEHOLDER); + return lookup_where(name, null); } public PyObject lookup_where(String name, PyObject[] where) { @@ -1059,7 +1056,9 @@ if (dict != null) { PyObject obj = dict.__finditem__(name); if (obj != null) { - where[0] = t; + if (where != null) { + where[0] = t; + } return obj; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-16 23:39:21
|
Revision: 6684 http://jython.svn.sourceforge.net/jython/?rev=6684&view=rev Author: pjenvey Date: 2009-08-16 23:39:05 +0000 (Sun, 16 Aug 2009) Log Message: ----------- fix javadoc, small cleanup Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2009-08-16 22:40:47 UTC (rev 6683) +++ trunk/jython/src/org/python/core/PyFile.java 2009-08-16 23:39:05 UTC (rev 6684) @@ -1,4 +1,7 @@ -// Copyright (c) Corporation for National Research Initiatives +/* + * Copyright (c) Corporation for National Research Initiatives + * Copyright (c) Jython Developers + */ package org.python.core; import java.io.InputStream; @@ -27,7 +30,7 @@ import org.python.expose.ExposedType; /** - * A python file wrapper around a java stream, reader/writer or file. + * The Python file type. Wraps an {@link TextIOBase} object. */ @ExposedType(name = "file") public class PyFile extends PyObject { @@ -103,8 +106,8 @@ * method <code>file</code> doesn't expose this functionality (<code>open</code> does * albeit deprecated) as it isn't available to regular Python code. To wrap an * InputStream in a file from Python, use - * {@link util.FileUtil#wrap(InputStream, int)} - * {@link util.FileUtil#wrap(InputStream)} + * {@link org.python.core.util.FileUtil#wrap(InputStream, int)} + * {@link org.python.core.util.FileUtil#wrap(InputStream)} */ public PyFile(InputStream istream, int bufsize) { this(istream, "<Java InputStream '" + istream + "' as file>", "r", bufsize, true); @@ -124,8 +127,8 @@ * method <code>file</code> doesn't expose this functionality (<code>open</code> does * albeit deprecated) as it isn't available to regular Python code. To wrap an * OutputStream in a file from Python, use - * {@link util.FileUtil#wrap(OutputStream, int)} - * {@link util.FileUtil#wrap(OutputStream)} + * {@link org.python.core.util.FileUtil#wrap(OutputStream, int)} + * {@link org.python.core.util.FileUtil#wrap(OutputStream)} */ public PyFile(OutputStream ostream, int bufsize) { this(ostream, "<Java OutputStream '" + ostream + "' as file>", "w", bufsize, true); @@ -240,13 +243,13 @@ } @ExposedMethod(defaults = {"-1"}, doc = BuiltinDocs.file_read_doc) - final synchronized PyString file_read(int n) { + final synchronized PyString file_read(int size) { checkClosed(); - return new PyString(file.read(n)); + return new PyString(file.read(size)); } - public PyString read(int n) { - return file_read(n); + public PyString read(int size) { + return file_read(size); } public PyString read() { @@ -303,6 +306,7 @@ return file_readlines(0); } + @Override public PyObject __iternext__() { return file___iternext__(); } @@ -329,7 +333,8 @@ return file_next(); } - @ExposedMethod(names = {"__enter__", "__iter__", "xreadlines"}, doc = BuiltinDocs.file___iter___doc) + @ExposedMethod(names = {"__enter__", "__iter__", "xreadlines"}, + doc = BuiltinDocs.file___iter___doc) final PyObject file_self() { checkClosed(); return this; @@ -339,6 +344,7 @@ return file_self(); } + @Override public PyObject __iter__() { return file_self(); } @@ -348,35 +354,35 @@ } @ExposedMethod(doc = BuiltinDocs.file_write_doc) - final void file_write(PyObject o) { - if (o instanceof PyUnicode) { + final void file_write(PyObject obj) { + if (obj instanceof PyUnicode) { // Call __str__ on unicode objects to encode them before writing - file_write(o.__str__().string); - } else if (o instanceof PyString) { - file_write(((PyString)o).string); - } else if (binary && o instanceof PyArray) { - file_write(((PyArray)o).tostring()); + file_write(obj.__str__().string); + } else if (obj instanceof PyString) { + file_write(((PyString)obj).string); + } else if (binary && obj instanceof PyArray) { + file_write(((PyArray)obj).tostring()); } else { throw Py.TypeError(String.format("argument 1 must be string or %sbuffer, not %.200s", binary ? "" : "read-only character ", - o.getType().fastGetName())); + obj.getType().fastGetName())); } } - final synchronized void file_write(String s) { + final synchronized void file_write(String string) { checkClosed(); softspace = false; - file.write(s); + file.write(string); } - public void write(String s) { - file_write(s); + public void write(String string) { + file_write(string); } @ExposedMethod(doc = BuiltinDocs.file_writelines_doc) - final synchronized void file_writelines(PyObject a) { + final synchronized void file_writelines(PyObject lines) { checkClosed(); - PyObject iter = Py.iter(a, "writelines() requires an iterable argument"); + PyObject iter = Py.iter(lines, "writelines() requires an iterable argument"); PyObject item = null; while ((item = iter.__iternext__()) != null) { @@ -387,8 +393,8 @@ } } - public void writelines(PyObject a) { - file_writelines(a); + public void writelines(PyObject lines) { + file_writelines(lines); } @ExposedMethod(doc = BuiltinDocs.file_tell_doc) @@ -506,6 +512,7 @@ return String.format("<%s file '%s', mode '%s' at %s>", state, name, mode, id); } + @Override public String toString() { return file_toString(); } @@ -540,19 +547,21 @@ throw Py.TypeError("can't delete numeric/char attribute"); } + @Override public Object __tojava__(Class<?> cls) { - Object o = null; + Object obj = null; if (InputStream.class.isAssignableFrom(cls)) { - o = file.asInputStream(); + obj = file.asInputStream(); } else if (OutputStream.class.isAssignableFrom(cls)) { - o = file.asOutputStream(); + obj = file.asOutputStream(); } - if (o == null) { - o = super.__tojava__(cls); + if (obj == null) { + obj = super.__tojava__(cls); } - return o; + return obj; } + @Override protected void finalize() throws Throwable { super.finalize(); if (closer != null) { @@ -569,15 +578,15 @@ } /** - * A mechanism to make sure PyFiles are closed on exit. On creation Closer adds itself to a list - * of Closers that will be run by PyFileCloser on JVM shutdown. When a PyFile's close or - * finalize methods are called, PyFile calls its Closer.close which clears Closer out of the - * shutdown queue. + * A mechanism to make sure PyFiles are closed on exit. On creation Closer adds itself + * to a list of Closers that will be run by PyFileCloser on JVM shutdown. When a + * PyFile's close or finalize methods are called, PyFile calls its Closer.close which + * clears Closer out of the shutdown queue. * - * We use a regular object here rather than WeakReferences and their ilk as they may be - * collected before the shutdown hook runs. There's no guarantee that finalize will be called - * during shutdown, so we can't use it. It's vital that this Closer has no reference to the - * PyFile it's closing so the PyFile remains garbage collectable. + * We use a regular object here rather than WeakReferences and their ilk as they may + * be collected before the shutdown hook runs. There's no guarantee that finalize will + * be called during shutdown, so we can't use it. It's vital that this Closer has no + * reference to the PyFile it's closing so the PyFile remains garbage collectable. */ private static class Closer { @@ -612,6 +621,7 @@ super("Jython Shutdown File Closer"); } + @Override public void run() { if (closers == null) { // closers can be null in some strange cases This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pj...@us...> - 2009-08-16 23:14:40
|
Revision: 6683 http://jython.svn.sourceforge.net/jython/?rev=6683&view=rev Author: pjenvey Date: 2009-08-16 22:40:47 +0000 (Sun, 16 Aug 2009) Log Message: ----------- restrict array writes to binary mode Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2009-08-16 22:25:58 UTC (rev 6682) +++ trunk/jython/src/org/python/core/PyFile.java 2009-08-16 22:40:47 UTC (rev 6683) @@ -354,12 +354,12 @@ file_write(o.__str__().string); } else if (o instanceof PyString) { file_write(((PyString)o).string); - } else if (o instanceof PyArray) { - ((PyArray)o).tofile(this); + } else if (binary && o instanceof PyArray) { + file_write(((PyArray)o).tostring()); } else { - //XXX: Match CPython's error message better - // "argument 1 must be string or read-only buffer, not {type}" - throw Py.TypeError("write requires a string or read-only buffer as its argument"); + throw Py.TypeError(String.format("argument 1 must be string or %sbuffer, not %.200s", + binary ? "" : "read-only character ", + o.getType().fastGetName())); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cg...@us...> - 2009-08-16 22:26:14
|
Revision: 6682 http://jython.svn.sourceforge.net/jython/?rev=6682&view=rev Author: cgroves Date: 2009-08-16 22:25:58 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Remove the ant exposer from Eclipse as it never seemed to work. Modified Paths: -------------- trunk/jython/.classpath trunk/jython/.project Removed Paths: ------------- trunk/jython/.externalToolBuilders/ Modified: trunk/jython/.classpath =================================================================== --- trunk/jython/.classpath 2009-08-16 18:21:50 UTC (rev 6681) +++ trunk/jython/.classpath 2009-08-16 22:25:58 UTC (rev 6682) @@ -1,10 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry excluding="com/ziclix/python/sql/handler/InformixDataHandler.java|com/ziclix/python/sql/handler/OracleDataHandler.java" kind="src" output="build/classes" path="src"/> + <classpathentry excluding="com/ziclix/python/sql/handler/InformixDataHandler.java|com/ziclix/python/sql/handler/OracleDataHandler.java" kind="src" path="src"/> <classpathentry kind="src" path="tests/modjy/java"/> - <classpathentry kind="src" output="build/classes" path="build/gensrc"/> - <classpathentry kind="src" output="build/classes" path="tests/java"/> - <classpathentry kind="src" path="bugtests/classes"/> + <classpathentry kind="src" path="build/gensrc"/> + <classpathentry kind="src" path="tests/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> <classpathentry kind="lib" path="extlibs/jline-0.9.95-SNAPSHOT.jar"/> @@ -20,7 +19,7 @@ <classpathentry kind="lib" path="extlibs/constantine-0.4.jar"/> <classpathentry kind="lib" path="extlibs/jna-posix.jar"/> <classpathentry kind="lib" path="extlibs/mockrunner-0.4.1/jar/jdom.jar"/> - <classpathentry kind="lib" path="extlibs/mockrunner-0.4.1/lib/jdk1.5/j2ee1.3/mockrunner-servlet.jar"/> - <classpathentry kind="lib" path="extlibs/jna.jar"/> - <classpathentry kind="output" path="bugtests/classes"/> + <classpathentry kind="lib" path="extlibs/mockrunner-0.4.1/lib/jdk1.5/j2ee1.3/mockrunner-servlet.jar"/> + <classpathentry kind="lib" path="extlibs/jna.jar"/> + <classpathentry kind="output" path="build/classes"/> </classpath> Modified: trunk/jython/.project =================================================================== --- trunk/jython/.project 2009-08-16 18:21:50 UTC (rev 6681) +++ trunk/jython/.project 2009-08-16 22:25:58 UTC (rev 6682) @@ -10,16 +10,6 @@ <arguments> </arguments> </buildCommand> - <buildCommand> - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>auto,</triggers> - <arguments> - <dictionary> - <key>LaunchConfigHandle</key> - <value><project>/.externalToolBuilders/Expose and jar.launch</value> - </dictionary> - </arguments> - </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-16 18:22:02
|
Revision: 6681 http://jython.svn.sourceforge.net/jython/?rev=6681&view=rev Author: fwierzbicki Date: 2009-08-16 18:21:50 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Found a couple more closed bugs that didn't make it into NEWS. Modified Paths: -------------- trunk/jython/NEWS Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-08-16 17:46:24 UTC (rev 6680) +++ trunk/jython/NEWS 2009-08-16 18:21:50 UTC (rev 6681) @@ -26,6 +26,10 @@ - [ 1415 ] ast Node creation fails with no arg constructors - [ 1405 ] Executing __run__.py from .jar throws exception(SystemExit: 0) in main when sys.exit(0) is called - [ 1439 ] Can't write() array.array + - [ 1139 ] crashes on isinstance + - [ 1430 ] Oracle JDBC Connection close + - [ 1406 ] Parsing a simple PEP 342 coroutine crashes Jython 2.5 + - [ 1407 ] ClassCastException in plain Python coroutine Jython 2.5.0 The same as rc4. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-16 17:46:30
|
Revision: 6680 http://jython.svn.sourceforge.net/jython/?rev=6680&view=rev Author: fwierzbicki Date: 2009-08-16 17:46:24 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Added some bug fixes to NEWS that didn't make it in before. Also re-ordered my most recent additions since most people grow the fix list downwards :) Modified Paths: -------------- trunk/jython/NEWS Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-08-16 15:32:04 UTC (rev 6679) +++ trunk/jython/NEWS 2009-08-16 17:46:24 UTC (rev 6680) @@ -8,8 +8,6 @@ the name of the produced proxy class. - Built in JSR 223 scripting engine, with LiveTribe JSR 223 implementation for JDK 5 Bugs Fixed - - [ 1439 ] Can't write() array.array - - [ 1415 ] ast Node creation fails with no arg constructors - [ 645615 ] cannot import through symbolic links - [ 1366 ] parsing of lamda expression fails - [ 1365 ] continuation lines fail in interactive interpreter @@ -21,6 +19,13 @@ - [ 1400 ] Evaluating expression via JSR 223 ScriptEngine returns null instead of True/False - [ 1413 ] Array data type (PostgreSQL) is not supported (NPE) - [ 1434 ] Cannot get return code from a process started with os.popen with Jython 2.5 (worked in 2.2) + - [ 1391 ] socket.getaddrinfo() breaks ftplib FTP client + - [ 1409 ] JSR-233 engine version numbers backwards + - [ 1408 ] JSR-223 engine doesn't implement I/O redirection + - [ 1393 ] TypeError: _new_impl(): expected 1 args; got 0 + - [ 1415 ] ast Node creation fails with no arg constructors + - [ 1405 ] Executing __run__.py from .jar throws exception(SystemExit: 0) in main when sys.exit(0) is called + - [ 1439 ] Can't write() array.array Jython 2.5.0 The same as rc4. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-16 15:32:14
|
Revision: 6679 http://jython.svn.sourceforge.net/jython/?rev=6679&view=rev Author: fwierzbicki Date: 2009-08-16 15:32:04 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Test file.write(array) Modified Paths: -------------- trunk/jython/Lib/test/test_array.py Modified: trunk/jython/Lib/test/test_array.py =================================================================== --- trunk/jython/Lib/test/test_array.py 2009-08-16 14:32:28 UTC (rev 6678) +++ trunk/jython/Lib/test/test_array.py 2009-08-16 15:32:04 UTC (rev 6679) @@ -216,6 +216,25 @@ if a.itemsize>1 and self.typecode not in ('b', 'B'): self.assertRaises(ValueError, b.fromstring, "x") + def test_filewrite(self): + a = array.array(self.typecode, 2*self.example) + f = open(test_support.TESTFN, 'wb') + try: + f.write(a) + f.close() + b = array.array(self.typecode) + f = open(test_support.TESTFN, 'rb') + b.fromfile(f, len(self.example)) + self.assertEqual(b, array.array(self.typecode, self.example)) + self.assertNotEqual(a, b) + b.fromfile(f, len(self.example)) + self.assertEqual(a, b) + f.close() + finally: + if not f.closed: + f.close() + test_support.unlink(test_support.TESTFN) + def test_repr(self): a = array.array(self.typecode, 2*self.example) self.assertEqual(a, eval(repr(a), {"array": array.array})) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-16 14:32:34
|
Revision: 6678 http://jython.svn.sourceforge.net/jython/?rev=6678&view=rev Author: fwierzbicki Date: 2009-08-16 14:32:28 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Update NEWS. Modified Paths: -------------- trunk/jython/NEWS Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-08-16 14:26:06 UTC (rev 6677) +++ trunk/jython/NEWS 2009-08-16 14:32:28 UTC (rev 6678) @@ -8,6 +8,7 @@ the name of the produced proxy class. - Built in JSR 223 scripting engine, with LiveTribe JSR 223 implementation for JDK 5 Bugs Fixed + - [ 1439 ] Can't write() array.array - [ 1415 ] ast Node creation fails with no arg constructors - [ 645615 ] cannot import through symbolic links - [ 1366 ] parsing of lamda expression fails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fwi...@us...> - 2009-08-16 14:26:13
|
Revision: 6677 http://jython.svn.sourceforge.net/jython/?rev=6677&view=rev Author: fwierzbicki Date: 2009-08-16 14:26:06 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Fix for http://bugs.jython.org/issue1439: Can't write() array.array Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2009-08-16 10:28:49 UTC (rev 6676) +++ trunk/jython/src/org/python/core/PyFile.java 2009-08-16 14:26:06 UTC (rev 6677) @@ -354,8 +354,12 @@ file_write(o.__str__().string); } else if (o instanceof PyString) { file_write(((PyString)o).string); + } else if (o instanceof PyArray) { + ((PyArray)o).tofile(this); } else { - throw Py.TypeError("write requires a string as its argument"); + //XXX: Match CPython's error message better + // "argument 1 must be string or read-only buffer, not {type}" + throw Py.TypeError("write requires a string or read-only buffer as its argument"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cg...@us...> - 2009-08-16 10:28:57
|
Revision: 6676 http://jython.svn.sourceforge.net/jython/?rev=6676&view=rev Author: cgroves Date: 2009-08-16 10:28:49 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Continue looking for methods to merge up the inheritance chain if the non-public class being merged has a parent that's non-public as well. Fixes issue 1430. Modified Paths: -------------- trunk/jython/Lib/test/test_java_visibility.py trunk/jython/src/org/python/core/PyJavaType.java Added Paths: ----------- trunk/jython/tests/java/org/python/tests/multihidden/ trunk/jython/tests/java/org/python/tests/multihidden/BaseConnection.java trunk/jython/tests/java/org/python/tests/multihidden/SpecialConnection.java Modified: trunk/jython/Lib/test/test_java_visibility.py =================================================================== --- trunk/jython/Lib/test/test_java_visibility.py 2009-08-16 08:11:44 UTC (rev 6675) +++ trunk/jython/Lib/test/test_java_visibility.py 2009-08-16 10:28:49 UTC (rev 6676) @@ -10,6 +10,7 @@ from org.python.tests import VisibilityResults as Results from org.python.tests.RedundantInterfaceDeclarations import (Implementation, ExtraClass, ExtraString, ExtraStringAndClass, ExtraClassAndString) +from org.python.tests.multihidden import BaseConnection class VisibilityTest(unittest.TestCase): def test_invisible(self): @@ -167,6 +168,15 @@ self.assertEquals("int", instance.call(7)) self.assertEquals("Class", instance.call(LinkedList)) + def test_extending_multiple_hidden_classes(self): + '''Tests multiple levels of non-public classes overriding public methods from superclasses + + Bug #1430''' + conn = BaseConnection.newConnection() + self.assertEquals("wrapper close", conn.close()) + self.assertEquals("special close", conn.close(7)) + + class JavaClassTest(unittest.TestCase): def test_class_methods_visible(self): self.assertFalse(HashMap.isInterface(), Modified: trunk/jython/src/org/python/core/PyJavaType.java =================================================================== --- trunk/jython/src/org/python/core/PyJavaType.java 2009-08-16 08:11:44 UTC (rev 6675) +++ trunk/jython/src/org/python/core/PyJavaType.java 2009-08-16 10:28:49 UTC (rev 6676) @@ -592,6 +592,11 @@ } if (forClass.getSuperclass() != null) { mergeMethods(forClass.getSuperclass()); + if (!Modifier.isPublic(forClass.getSuperclass().getModifiers())) { + // If the superclass is also not public, it needs to get the same treatment as we + // can't call its methods either. + handleSuperMethodArgCollisions(forClass.getSuperclass()); + } } } Added: trunk/jython/tests/java/org/python/tests/multihidden/BaseConnection.java =================================================================== --- trunk/jython/tests/java/org/python/tests/multihidden/BaseConnection.java (rev 0) +++ trunk/jython/tests/java/org/python/tests/multihidden/BaseConnection.java 2009-08-16 10:28:49 UTC (rev 6676) @@ -0,0 +1,33 @@ +package org.python.tests.multihidden; + +/** + * Derived from the Oracle JDBC connection classes for use in test_extending_multiple_hidden_classes + * in test_java_visibility. + */ +public class BaseConnection { + public static Connection newConnection() { + return new Connection(); + } + + public String close() { + return "base close"; + } +} + +class Connection extends ConnectionWrapper implements SpecialConnection { + + public String close(int foo) { + return "special close"; + } +} + +class ConnectionWrapper extends BaseConnection { + +// This method, plus the fact that Connection implements an interface with a different +// close, causes BaseConnection.close to be hidden in Connection because +// ConnectionWrapper is not public + @Override + public String close() { + return "wrapper close"; + } +} Added: trunk/jython/tests/java/org/python/tests/multihidden/SpecialConnection.java =================================================================== --- trunk/jython/tests/java/org/python/tests/multihidden/SpecialConnection.java (rev 0) +++ trunk/jython/tests/java/org/python/tests/multihidden/SpecialConnection.java 2009-08-16 10:28:49 UTC (rev 6676) @@ -0,0 +1,5 @@ +package org.python.tests.multihidden; + +public interface SpecialConnection { + String close(int foo); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cg...@us...> - 2009-08-16 08:11:57
|
Revision: 6675 http://jython.svn.sourceforge.net/jython/?rev=6675&view=rev Author: cgroves Date: 2009-08-16 08:11:44 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Have lookup call through to lookup_where rather than duplicating the lookup functionality Modified Paths: -------------- trunk/jython/src/org/python/core/PyType.java Modified: trunk/jython/src/org/python/core/PyType.java =================================================================== --- trunk/jython/src/org/python/core/PyType.java 2009-08-16 03:04:08 UTC (rev 6674) +++ trunk/jython/src/org/python/core/PyType.java 2009-08-16 08:11:44 UTC (rev 6675) @@ -90,6 +90,9 @@ /** Mapping of Java classes to their TypeBuilders. */ private static Map<Class<?>, TypeBuilder> classToBuilder; + /** Used by {@link #lookup} to call {@link #lookup_where} without allocating an array */ + private static final PyObject[] WHERE_PLACEHOLDER = new PyObject[1]; + protected PyType(PyType subtype) { super(subtype); } @@ -1043,20 +1046,7 @@ * @return found object or null */ public PyObject lookup(String name) { - PyObject[] mro = this.mro; - if (mro == null) { - return null; - } - for (PyObject element : mro) { - PyObject dict = element.fastGetDict(); - if (dict != null) { - PyObject obj = dict.__finditem__(name); - if (obj != null) { - return obj; - } - } - } - return null; + return lookup_where(name, WHERE_PLACEHOLDER); } public PyObject lookup_where(String name, PyObject[] where) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |