This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Long module names fail on the Mac
Type: Stage:
Components: macOS Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: gvanrossum, jackjansen
Priority: low Keywords:

Created on 2001-09-05 20:20 by jackjansen, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg6381 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2001-09-05 20:20
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:-).
msg6382 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-09-05 20:32
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).
msg6383 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-21 15:16
Logged In: YES 
user_id=45365

Let's be frank about it: this isn't going to be fixed.
History
Date User Action Args
2022-04-10 16:04:24adminsetgithub: 35119
2001-09-05 20:20:42jackjansencreate