[issue27998] Remove support of bytes paths in os.scandir()

2016-10-04 Thread STINNER Victor
STINNER Victor added the comment: I suggest to modify posixmodule.c to support bytes on Windows at the C level. Since Windows uses utf8, there is no more real reason to drop bytes support only on Windows. -- ___ Python tracker

[issue27998] Remove support of bytes paths in os.scandir()

2016-10-04 Thread Guido van Rossum
Guido van Rossum added the comment: It went back and forth. The current feeling is to *keep* that support, especially since their deprecation on Windows has been *undone* in 3.6. Feel free to update the title (though the initial comments may be harder to understand without the context of the

[issue27998] Remove support of bytes paths in os.scandir()

2016-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm confused by the current title of this issue. Should the support of bytes paths in os.scandir() be removed or preserved? In latter case we can remove workaround code from os and glob. -- ___ Python tracker

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-25 Thread Guido van Rossum
Guido van Rossum added the comment: Nice! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know what is the benefit of removing support of bytes paths in os.scandir(), but supporting bytes paths allows to remove ugly workarounds from os and glob modules. Lib/glob.py | 16 !! Lib/os.py | 67

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread Steve Dower
Steve Dower added the comment: There are only two references to bytes in the pep: > Like the other functions in the os module, scandir() accepts either a > bytes or str object for the path parameter, and returns the > DirEntry.name and DirEntry.path attributes with the same type as > path .

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread STINNER Victor
STINNER Victor added the comment: I'm ok to support os.scandir(bytes) on Windows. My long term goal was to drop bytes support on Windows, but it seems like the new trend is more to keep this support and even enhance it. It's quite easy to support os.scandir(bytes) on Windows, whereas it seems

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But why? The code of os and glob modules could be simpler if add the support. -- ___ Python tracker ___

[issue27998] Remove support of bytes paths in os.scandir()

2016-09-07 Thread Steve Dower
Changes by Steve Dower : -- title: Add support of bytes paths in os.scandir() -> Remove support of bytes paths in os.scandir() ___ Python tracker