Message74059
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 |
|
Date |
User |
Action |
Args |
2008-09-30 01:08:12 | vstinner | set | recipients:
+ vstinner, gvanrossum, loewis, amaury.forgeotdarc, pitrou, draghuram, benjamin.peterson, HWJ, dlitz, zegreek |
2008-09-30 01:08:11 | vstinner | set | messageid: <1222736891.79.0.535221009659.issue3187@psf.upfronthosting.co.za> |
2008-09-30 01:08:11 | vstinner | link | issue3187 messages |
2008-09-30 01:08:10 | vstinner | create | |
|