[Python-Dev] Import and unicode: part two

Victor Stinner victor.stinner at haypocalc.com
Wed Jan 19 22:44:40 CET 2011

Le mercredi 19 janvier 2011 à 12:19 -0800, Glenn Linderman a écrit :
> Since Python allows non-ASCII variable names, I think it should allow 
> non-ASCII module names also, on any platform that supports the 
> appropriate characters in the filesystem.
> Since some platforms already accept them, dropping them would be 
> incompatible.


> If Victor already has a patch coded (i.e. the work is basically done, no 
> waiting in line 3), I'm even more in favor of it.  If it took lots of 
> future hard work, and no one volunteered to do it, that would perhaps be 
> justification for retaining module name restrictions.  I guess that is 
> not the case here, so...

I am volunteer to do the work, and I already have a working patch (but
it is not ready yet to be commited, it requires a long review).

FYI, I rewrote the patch 4 times since one year, for different reasons:

 - the patch is huge, complex, and I was unable to "write it correctly"
   the first time
 - I splitted the work into two big parts: support non-ASCII paths
   (done in Python 3.2) and the other changes in the part two
 - Update an huge patchset on py3k tree is hard, even with git-svn
   (and git svn rebase)
 - In my first tries, I didn't patch the import machinery to support
   non-ASCII module names, I only patched the support of non-ASCII 

But I don't want to apply such huge patch if Python code developers
don't want to support non-ASCII module names and unencodable paths.


More information about the Python-Dev mailing list