Issue #367 wontfix

Importing setuptools.sandbox fails on Jython 2.5.0 and 2.5.1 since version 0.6.33

Yuu Yamashita
created an issue

Since distribute 0.6.33, importing setuptools.sandbox fails on Jython 2.5.0 and 2.5.1 by following exception.

% python
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools.sandbox
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "setuptools/sandbox.py", line 3, in <module>
    import org.python.modules.posix.PosixModule as _os
ImportError: No module named posix

This seems that the problem was caused by the incompatibility of location of posix module. But I'm not sure how I can fix this reliably.

import os, sys, __builtin__, tempfile, operator, pkg_resources
if os.name == "java":
    import org.python.modules.posix.PosixModule as _os
else:
    _os = sys.modules[os.name]
try:
    _file = file
except NameError:
    _file = None

Comments (6)

  1. Yuu Yamashita reporter

    Sorry for insufficient information. I am using latest snapshot of Debian GNU/Linux sid.

    % uname -a
    Linux kujira 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux
    

    I found that this only happened on Jython 2.5.0 and 2.5.1, and not happened on 2.5.2 and 2.5.3. I'll try to test with recent snapshot of Jython 2.5 and 2.7.

  2. Yuu Yamashita reporter

    Agree. I don't prefer those workarounds too.

    BTW, I have my project pyenv (a kind of package manager for python variants) and am maintaining it now. If the recent distribute stops supporting Jython prior than 2.5.1 anymore, I'd also like to drop support for them. Is there any policies or guidelines that describes which python version should be supported by distribute?

  3. Jason R. Coombs

    Distribute supports Python 2.4+.

    Based on the description, the bug lies in Jython 2.5.1 and was fixed in Jython 2.5.2. Based on this information, Distribute supports Jython 2.5.

    Until such time as we have a proposed patch to fix this issue, I'm going to mark it as 'wontfix'. Feel free to propose a patch to support Jython 2.5.0 and 2.5.1 if support for those older versions is desirable.

  4. Log in to comment