zope.interface.declarations ('__module__' not in locals) fails in Jython
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.interface |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Jython's current compiler evaluates the body of the class before it fills in the class . In two places in declarations.py, zope.interface checks that a local __module__ variable exists, but in Jython trunk (which reports itself as 2.3.0a0) this is not the case, so the test always fails.
We (Jython developers) are not going to fix this in the current compiler, but we will fix it in the new 2.5-compatible compiler. We have worked around another case tested for in zope.interface with __doc__ assignment/
Since you already make this test conditional on Python version, perhaps you could just remove it entirely? Otherwise, you can make it conditional on Jython (sys.platform.
A setup.py change is also necessary to get zope.interface working on Jython trunk (so it doesn't fail on trying to compile the extension module); I'll file that as a separate bug.
Changed in zope3: | |
status: | New → Won't Fix |
We no longer support Python < 2.6. We can't add Jython support until the tox/pip mess is fixed.