[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-22 Thread STINNER Victor
STINNER Victor added the comment: MvL, MaL and Antoine Pitrou agreed to drop support of bytearray filenames in Python. I choosed to remove it directly in Python 3.2 because it wasn't really used, open() and os.path never supported bytearray filenames, and I will simplify the other issues rela

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Or perhaps the bytearray can be converted to a bytes object. This is not > optimal performance-wise but is unlikely to make a difference in real-world > code (if you are passing a filename

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm in favor of removing that support, too, but please check with python-dev whether anybody thinks a proper deprecation cycle (deprecated in 3.2, removed in 3.3) is needed. -- ___ Python tracker

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or perhaps the bytearray can be converted to a bytes object. This is not optimal performance-wise but is unlikely to make a difference in real-world code (if you are passing a filename to an external API, chances are some IO will occur which will dwarf the co

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread STINNER Victor
STINNER Victor added the comment: Patch removing bytearray filename support: it mostly removes code. -- keywords: +patch Added file: http://bugs.python.org/file17024/no_bytearray_filename.patch ___ Python tracker _

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread STINNER Victor
New submission from STINNER Victor : r72313 (PEP 383) created the PyUnicode_FSConverter() function: encode an object to a byte string using the default file system encoding. PyBytes and PyByteArray are leaved unchanged (just increment the reference counter), PyUnicode is encoded to PyBytes (if