Issue1464
Created on 2009-09-10.12:29:21 by mlhetland, last changed 2010-09-14.15:17:05 by zyasoft.
File name |
Uploaded |
Description |
Edit |
Remove |
jyt-imp-bug.zip
|
mlhetland,
2009-09-10.12:29:20
|
Code that demonstrates the problem |
|
|
msg5132 (view) |
Author: Magnus Lie Hetland (mlhetland) |
Date: 2009-09-10.12:29:20 |
|
Assume you have a module consisting of ./module/__init__.py and
./module/JavaClass.class; then you have the test script ./test/test.py
which imports module. If you run this with "python test/test.py", the
__init__.py will be executed, but if you use jython, it won't. If you
either move test.py to the current directory *or* remove
JavaClass.class, you will get correct behavior.
I've attached a minimal example, with a makefile that runs with and
without the compiled class, as well as with Python, for comparison. This
seems like a bug to me...
|
msg6034 (view) |
Author: Jim Baker (zyasoft) |
Date: 2010-09-03.16:40:17 |
|
We really don't have a good solution here, other than advise users to be careful how to mix Java code and Python code in the same directory.
The problem is related to the fact that we require __init__.py for Python modules (something that wasn't necessary in the past), while imports from Java obey Java (and thus different) semantics.
I'm going to mark this "won't fix", but pend that in case we can come up something clever to resolve.
|
msg6068 (view) |
Author: Jim Baker (zyasoft) |
Date: 2010-09-14.15:17:05 |
|
#1653 is a duplicate, but it has better description of the underlying problem. Closing this out in favor of that issue.
|
|
Date |
User |
Action |
Args |
2010-09-14 15:17:05 | zyasoft | set | status: pending -> closed resolution: wont fix -> duplicate messages:
+ msg6068 |
2010-09-03 16:40:18 | zyasoft | set | status: open -> pending resolution: wont fix messages:
+ msg6034 nosy:
+ zyasoft |
2009-09-11 20:15:00 | fwierzbicki | set | nosy:
+ fwierzbicki |
2009-09-10 12:29:21 | mlhetland | create | |
|