[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2016-10-17 Thread STINNER Victor
STINNER Victor added the comment: "FWIW this patch broke the _pyio module on Cygwin," Please open a new issue, this one is closed. -- ___ Python tracker ___

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2016-10-17 Thread Erik Bray
Erik Bray added the comment: FWIW this patch broke the _pyio module on Cygwin, as the msvcrt module is not built on Cygwin. AFAICT this is only a problem for Python built with MSVCRT, which Cygwin does not use. When test case works as expected on Cygwin without this. -- nosy: +erik.

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch. Thank you for your report Cosimo. Thank you for your patch Akira. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 687da8760a58 by Serhiy Storchaka in branch '3.5': Issue #24881: Fixed setting binary mode in Python implementation of FileIO https://hg.python.org/cpython/rev/687da8760a58 New changeset 2dd9294f679d by Serhiy Storchaka in branch 'default': Issue #24

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-21 Thread eryksun
eryksun added the comment: > It is not clear why the absence of _setmode(fd, os.O_BINARY) > is not detected by tests. It's only a problem when an existing text-mode file descriptor is passed in. For example, in text mode the CRT handles b'\x1a' as an EOF marker: Python 3.5.0b4 (v3.5.0b4:c0

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo, serhiy.storchaka versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mai

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-21 Thread Akira Li
Akira Li added the comment: To make _pyio correspond to the C version I've added sys.platform in {'win32', 'cygwin'} condition. See the attached pyio_setmode.diff It is not clear why the absence of _setmode(fd, os.O_BINARY) is not detected by tests. (a) a corresponding test should be ad

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-17 Thread Zachary Ware
Changes by Zachary Ware : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.4, Python 3.6 ___ Python tracker ___ _

[issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt'

2015-08-17 Thread Cosimo Lupo
New submission from Cosimo Lupo: the `_pyio` module at line 16 tries to check whether it is running on Windows platform, by doing: ``` if os.name == 'win32': from msvcrt import setmode as _setmode else: _setmode = None ``` However, the string returned by os.name is 'nt' and not 'win32'