[Jython-checkins] jython: Improved dummy implementation of unsupported variant of JavaCode.call.
stefan.richthofer
jython-checkins at python.org
Sun Jan 8 09:18:27 EST 2017
https://hg.python.org/jython/rev/5f90bba90482
changeset: 7987:5f90bba90482
user: Stefan Richthofer <stefan.richthofer at gmx.de>
date: Sun Jan 08 15:18:04 2017 +0100
summary:
Improved dummy implementation of unsupported variant of JavaCode.call.
files:
src/org/python/core/Py.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/org/python/core/Py.java b/src/org/python/core/Py.java
--- a/src/org/python/core/Py.java
+++ b/src/org/python/core/Py.java
@@ -2714,9 +2714,14 @@
@Override
public PyObject call(ThreadState state, PyFrame frame, PyObject closure) {
- //XXX: what the heck is this? Looks like debug code, but it's
- // been here a long time...
- System.out.println("call #1");
+ /* This should actually
+ * throw new UnsupportedOperationException(
+ * "JavaCode doesn't support call with signature "+
+ * "(ThreadState state, PyFrame frame, PyObject closure).");
+ * However since this would be an API-change, for 2.7 series we just warn.
+ */
+ Py.warning(Py.RuntimeWarning, "JavaCode doesn't support call with signature "+
+ "(ThreadState state, PyFrame frame, PyObject closure).");
return Py.None;
}
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list