Message12000
As of Jython 2.7.1, adding a list containing non-PyObjects to another will result in a "java.lang.ClassCastException: <java type> cannot be cast to org.python.core.PyObject". The attached reproducer illustrates the problem - it works in 2.7.0 but not in 2.7.1+, instead failing on the final line.
This appears to be the result of a simple refactor (https://github.com/jythontools/jython/commit/707188dfbc029efac40819f6d864cf63bbdd71f3) rather than an intentional change: PyList.add takes Objects and performs the java2py wrapping itself, so attempting to cast the list to PyObjects before this point is incorrect. |
|
Date |
User |
Action |
Args |
2018-05-23 13:17:23 | jonathan.simmonds | set | messageid: <1527081443.95.0.682650639539.issue2688@psf.upfronthosting.co.za> |
2018-05-23 13:17:23 | jonathan.simmonds | set | recipients:
+ jonathan.simmonds |
2018-05-23 13:17:23 | jonathan.simmonds | link | issue2688 messages |
2018-05-23 13:17:23 | jonathan.simmonds | create | |
|