[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Steve Dower added the comment: New changeset c63ae1122f84d4188ffadfd1454902093eb10be1 by Steve Dower in branch '3.6': bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912) (#1925)

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +2005 ___ Python tracker ___ ___

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Segev Finer
Changes by Segev Finer : -- type: -> behavior ___ Python tracker ___ ___

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Steve Dower added the comment: Yeah, make it a separate issue. This PR fixes an obvious error that we should just fix, so I've merged it. (I might get to the backport today, but if someone else submits it then I'll merge.) -- ___ Python tracker

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Steve Dower added the comment: New changeset 523776c3419f6795e78173d53c10e35ec4eed48d by Steve Dower (Segev Finer) in branch 'master': bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912)

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Segev Finer
Segev Finer added the comment: We might want to open a separate issue for the FD redirection issue since this one was really about the _io._WindowsConsoleIO.write GetLastError() issue. Also see https://github.com/pytest-dev/pytest/pull/2462 where I discuss this more. Still not sure why it's

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Eryk Sun
Eryk Sun added the comment: The following is an example of the problem, right? >>> fd = os.open('stdout.txt', os.O_CREAT | os.O_WRONLY) >>> os.dup2(fd, 1) >>> print('spam') Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-01 Thread Segev Finer
Changes by Segev Finer : -- pull_requests: +1992 ___ Python tracker ___ ___

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-01 Thread Segev Finer
New submission from Segev Finer: Found due to this: https://github.com/pytest-dev/py/issues/103 I'm going to submit a PR. -- components: IO, Windows messages: 294975 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: