Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 93013 Details for
Bug 142099
jython-2.1 uses reserved assert function from Java
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
workaround
jython-2.1-reserved-assert-func.diff (text/plain), 1.63 KB, created by
Hanno Zysik (geki)
on 2006-07-29 08:54:19 UTC
(
hide
)
Description:
workaround
Filename:
MIME Type:
Creator:
Hanno Zysik (geki)
Created:
2006-07-29 08:54:19 UTC
Size:
1.63 KB
patch
obsolete
>--- jython-2.1/org/python/core/Py.java.orig 2006-07-29 17:47:33.000000000 +0200 >+++ jython-2.1/org/python/core/Py.java 2006-07-29 17:50:04.000000000 +0200 >@@ -986,14 +986,14 @@ > > > /* Equivalent to Python's assert statement */ >- public static void assert(PyObject test, PyObject message) { >+ public static void assert_(PyObject test, PyObject message) { > if (!test.__nonzero__()) { > throw new PyException(Py.AssertionError, message); > } > } > >- public static void assert(PyObject test) { >- assert(test, Py.None); >+ public static void assert_(PyObject test) { >+ assert_(test, Py.None); > } > > /* Helpers to implement finally clauses */ >--- jython-2.1/org/python/core/PyJavaClass.java.orig 2006-07-29 17:47:59.000000000 +0200 >+++ jython-2.1/org/python/core/PyJavaClass.java 2006-07-29 17:49:00.000000000 +0200 >@@ -705,7 +705,7 @@ > "while", "for", "try", "except", "def", "class", "finally", > "print", > "pass", "break", "continue", "return", "import", "from", "del", >- "raise", "global", "exec", "assert"}; >+ "raise", "global", "exec", "assert_"}; > for (int i=0; i<words.length; i++) { > keywords.put(words[i]+"_", words[i].intern()); > } >--- jython-2.1/org/python/parser/PythonGrammarConstants.java.orig 2006-07-29 17:49:20.000000000 +0200 >+++ jython-2.1/org/python/parser/PythonGrammarConstants.java 2006-07-29 17:49:31.000000000 +0200 >@@ -197,7 +197,7 @@ > "\"raise\"", > "\"global\"", > "\"exec\"", >- "\"assert\"", >+ "\"assert_\"", > "\"as\"", > "<NAME>", > "<LETTER>",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 142099
:
93013
|
93018