[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-08-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 818f22f9ab02 by Serhiy Storchaka in branch 'default': Issue #26754: Undocumented support of general bytes-like objects https://hg.python.org/cpython/rev/818f22f9ab02 -- ___ Python tracker

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch deprecates the support of bytes-like objects (except bytes itself) in PyUnicode_FSDecoder() for consistency with issue26800. -- dependencies: +Don't accept bytearray as filenames part 2 versions: -Python 3.5 Added file:

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e48c2c4c733 by Serhiy Storchaka in branch '3.5': Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as https://hg.python.org/cpython/rev/2e48c2c4c733 New changeset e18ac7370113 by Serhiy Storchaka in branch 'default': Issue

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes PyUnicode_FSDecoder() rejecting arbitrary iterables. -- assignee: -> serhiy.storchaka keywords: +patch stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file43340/PyUnicode_FSDecoder-no-list.patch

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-04-18 Thread Philip Jenvey
Philip Jenvey added the comment: See issue26800 for reasoning to go with #4 -- nosy: +pjenvey ___ Python tracker ___

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_FSDecoder() is used in following functions in the stdlib: compile() symtable.symtable() parser.compile() parser.compilest() zipimporter.zipimporter() _imp.load_dynamic() (before 3.5) This is behavior of PyUnicode_FSDecoder() from the start

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-04-14 Thread Martin Panter
Martin Panter added the comment: I agree it is a bit strange. It looks like it is a victim of PyBytes_FromObject() doing more than it says; its documentation only mentions the buffer protocol, not accepting iterables. -- nosy: +martin.panter ___

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-04-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree this doens't make sense. -- nosy: +pitrou ___ Python tracker ___

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-04-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyUnicode_FSDecoder() accepts not only str and bytes or bytes-like object, but arbitrary iterable, e.g. list. Example: >>> compile('', [116, 101, 115, 116], 'exec') at 0xb6fb1340, file "test", line 1> I think accepting arbitrary iterables is