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.

Author vstinner
Recipients HWJ, amaury.forgeotdarc, benjamin.peterson, dlitz, draghuram, gvanrossum, loewis, pitrou, vstinner, zegreek
Date 2008-09-30.01:08:08
SpamBayes Score 3.3392094e-09
Marked as misclassified No
Message-id <1222736891.79.0.535221009659.issue3187@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2008-09-30 01:08:12vstinnersetrecipients: + vstinner, gvanrossum, loewis, amaury.forgeotdarc, pitrou, draghuram, benjamin.peterson, HWJ, dlitz, zegreek
2008-09-30 01:08:11vstinnersetmessageid: <1222736891.79.0.535221009659.issue3187@psf.upfronthosting.co.za>
2008-09-30 01:08:11vstinnerlinkissue3187 messages
2008-09-30 01:08:10vstinnercreate