[Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue
Victor Stinner
victor.stinner at haypocalc.com
Wed Oct 1 02:17:33 CEST 2008
Le Wednesday 01 October 2008 00:28:22 Martin v. Löwis, vous avez écrit :
> I don't think we will manage to release Python 3.0 this year if that
> change is to be implemented. And then, I don't think the release manager
> will agree to such a delay.
The minimum change is to disallow bytes/str mix:
- os.listdir(unicode)->unicode and ignore invalid files
(current behaviour is to return unicode and bytes)
- os.readlink(unicode)->unicode or raise an error
(current behaviour is to return unicode or bytes)
- remove os.getcwdu() (use its code -which is better- for getcwd)
and fix the test_unicode_file.py
listdir() change (ignore invalid filenames) is important to avoid strange bugs
in os.path.*(), glob.*() or on displaying a filename.
I can generate a specific patch for these issues. It's just a subset of my
last patch.
--
Victor Stinner aka haypo
http://www.haypocalc.com/blog/
More information about the Python-Dev
mailing list