STINNER Victor <[EMAIL PROTECTED]> added the comment: Patch python3_bytes_filename.patch: - open() support bytes - listdir(unicode) -> only unicode, *skip* invalid filenames (as asked by Guido) - remove os.getcwdu() - create os.getcwdb() -> bytes - glob.glob() support bytes - fnmatch.filter() support bytes - posixpath.join() and posixpath.split() support bytes
Mixing bytes and str is invalid. Examples raising a TypeError: - posixpath.join(b'x', 'y') - fnmatch.filter([b'x', 'y'], '*') - fnmatch.filter([b'x', b'y'], '*') - glob.glob1('.', b'*') - glob.glob1(b'.', '*') TODO: - review this patch :-) - support non-ASCII bytes in fnmatch.filter() - fix other functions, eg. posixpath.isabs() and fnmatch.fnmatchcase() - fix functions written in C: grep FileSystemDefaultEncoding - make sure that mixing bytes and str is rejected Added file: http://bugs.python.org/file11658/python3_bytes_filename.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3187> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com