Message1016

Author nobody
Recipients
Date 2005-08-11.08:29:20
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Importing a module, which is implemented as a directory
with a __init__.py, fails if directory name is 12
characters or longer. If the module is a regular .py
file importing it works ok. See the listing below for
an example.

Bug seems to be specific to Jython 2.2 alpha 1 since
importing works ok with Jython 2.1 and Python 2.4. I'm
using Sun Java 1.5 but the problem appeared also with
Java 1.4.

--------8<----------------8<----------------

$ uname
CYGWIN_NT-5.1

$ java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed
mode, sharing)

$ ls -lR 
.:
total 32
drwxr-xr-x  2 peke None 0 Aug 11 09:35 mod_dir__11/
drwxr-xr-x  2 peke None 0 Aug 11 09:58 mod_dir___12/
-rw-r--r--  1 peke None 8 Aug 11 09:58 mod_file_11.py
-rw-r--r--  1 peke None 8 Aug 11 09:58 mod_file__12.py

./mod_dir__11:
total 16
-rw-r--r--  1 peke None 8 Aug 11 09:57 __init__.py

./mod_dir___12:
total 16
-rw-r--r--  1 peke None 8 Aug 11 09:58 __init__.py

$ /cygdrive/c/jython-2.2a1/jython.bat
Jython 2.2a1 on java1.5.0_02 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> import mod_file_11
>>> import mod_file__12 
>>> import mod_dir__11
>>> import mod_dir___12
Traceback (innermost last):
  File "<console>", line 1, in ?
ImportError: no module named mod_dir___12
>>> 
History
Date User Action Args
2008-02-20 17:17:24adminlinkissue1256506 messages
2008-02-20 17:17:24admincreate