[New-bugs-announce] [issue26800] Don't accept bytearray as filenames part 2

Philip Jenvey report at bugs.python.org
Mon Apr 18 17:34:55 EDT 2016


New submission from Philip Jenvey:

Basically a reopen of the older issue8485 with the same name. It was decided there to drop support for bytearray filenames -- partly because of the complexity of handling buffers but it was also deemed to just not make much sense.

This regressed or crept back into the posix module with the big path_converter changes for 3.3:

https://hg.python.org/cpython/file/ee9921b29fd8/Lib/test/test_posix.py#l411

IMHO this functionality should be deprecated/removed per the original discussion, or does someone want to reopen the debate?

The os module docs (and path_converter's own docs) explicitly advertise handling of str or bytes, not bytearrays or buffers. Even os.fsencode rejects bytearrays/buffers.

Related to issue26754 -- further inconsistencies around filename handling

----------
assignee: larry
components: Interpreter Core
keywords: 3.3regression
messages: 263694
nosy: Ronan.Lamy, haypo, larry, pitrou, pjenvey, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Don't accept bytearray as filenames part 2
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26800>
_______________________________________


More information about the New-bugs-announce mailing list