[Python-bugs-list] [ python-Bugs-458874 ] Long module names fail on the Mac

noreply@sourceforge.net noreply@sourceforge.net
Wed, 05 Sep 2001 13:32:29 -0700


Bugs item #458874, was opened at 2001-09-05 13:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458874&group_id=5470

Category: Macintosh
Group: None
Status: Open
Resolution: None
Priority: 2
Submitted By: Jack Jansen (jackjansen)
>Assigned to: Jack Jansen (jackjansen)
Summary: Long module names fail on the Mac

Initial Comment:
Long module names fail on the Mac. Or, more precisely, test_repr fails (if you take out
the "if" that disables the testing of long module names on the Mac).

It needs to be investigated whether it is the mkdir() calls and such in test_repr which
are the cause of the problem (in which case the problem is really with the test: methinks
platforms are free to raise EINVAL for "illegal" filenames in I/O calls).

The other question is what the Python specs say about the number of significant characters
in a module name, and how to handle modules that have names longer than the underlying
storage system supports. The language reference simply says that identifiers are unlimited in
length, but on Unix "unlimited" for modulenames means "255" (and probably something
similar on Windows).

This last paragraph is the reason I'm assigning this to Guido, I can't start on a fix until I
know what I should aim for. Feel free to assign it back (unless you want to fix it yourself:-).


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 13:32

Message:
Logged In: YES 
user_id=6380

Hm...  I think that an import of a really long module name
might truncate the name that it looks for on the filesystem;
that's what Windows used to do in 8+3 mode AFAIK. But this
is really up to the platform; I haven't really thought that
much about the mapping of long module names.

But I think it's OK for a mkdir() or open() to fail if a
component of the name is too long -- filename syntax is up
to the OS.

For a fix of the test, I would simply change the really long
package name to a slightly shorter one (say, 28 chars long
to allow for the ".pyc" suffix).


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458874&group_id=5470