[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +877

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bab9fda568 by Steve Dower in branch '3.6':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/d0bab9fda568

New changeset 187a114b9ef4 by Steve Dower in branch 'default':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/187a114b9ef4

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

I'll pass the "correct" flags, since the docs don't specify that they aren't 
used, which means one day they might become relevant.

--
assignee:  -> steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-14 Thread Eryk Sun

New submission from Eryk Sun:

WindowsConsoleIO fileno() gets a file descriptor on demand by calling 
_open_osfhandle. As a low I/O function this expects _open flags, but currently 
the code is passing 'rb' (int 0x7262) and 'wb' (int 0x7762). It should use 
_O_RDONLY | _O_BINARY and _O_WRONLY | _O_BINARY. 

Actually, _open_osfhandle isn't actually opening the file, so it only cares 
about a few flags. Specifically, in lowio\osfinfo.cpp I see that it looks for 
_O_APPEND, _O_TEXT, and _O_NOINHERIT. So in this case passing 0 for the flags 
would also be ok.

--
components: IO, Library (Lib), Windows
messages: 276509
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com