Message6064
Whenever mixing Jython and Java class in the same package structure and the Java class is not explicitly mentioned in __init__.py, the module fails to find it in subsequent import calls.
from foo import bar // OK
from foo import Foo // ERROR
(Yes, we are able to mix java and jython code within the same structure since Jython 2.1 and managed to make it work under Jython 2.5.1 as well)
This is due to the fact that an PyModule is initialized once but incomplete. Rather than to do a full initialization one could simply fix this by adding the following code to PyModule.
@Override
public PyObject __findattr_ex__(String name) {
PyObject attr=super.__findattr_ex__(name);
if (attr!=null)
return attr;
return impAttr(name);
}
Problem found in 2.5.1 and 2.5.2b2 |
|
Date |
User |
Action |
Args |
2010-09-14 12:49:44 | babelmania | set | recipients:
+ babelmania |
2010-09-14 12:49:43 | babelmania | set | messageid: <1284468583.35.0.292780427805.issue1653@psf.upfronthosting.co.za> |
2010-09-14 12:49:43 | babelmania | link | issue1653 messages |
2010-09-14 12:49:41 | babelmania | create | |
|