[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-26 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington
miss-islington added the comment: New changeset 3921d12174c1998d9df7a08d036a7fef2d587a64 by Miss Islington (bot) in branch '3.8': bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389) https://github.com/python/cpython/commit/3921d12174c1998d9df7a08d036a7fef2d587a64

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington
miss-islington added the comment: New changeset f8dc3e85ab01e1b0345738670dcb3993da7ec436 by Miss Islington (bot) in branch '3.7': bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389) https://github.com/python/cpython/commit/f8dc3e85ab01e1b0345738670dcb3993da7ec436

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +15132 pull_request: https://github.com/python/cpython/pull/15438 ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +15131 pull_request: https://github.com/python/cpython/pull/15437 ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Steve Dower
Steve Dower added the comment: New changeset 5be666010e4df65dc4d831435cc92340ea369f94 by Steve Dower (Zackery Spytz) in branch 'master': bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389) https://github.com/python/cpython/commit/5be666010e4df65dc4d831435cc92340ea369f94

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Steve Dower
Steve Dower added the comment: Thanks, Eryk. In that case, I'll merge the PR. Since Python 3.9 will not support Windows 7, we can remove it from master as soon as the backports are done :) -- assignee: -> steve.dower ___ Python tracker

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Eryk Sun
Eryk Sun added the comment: > Should we add a version check as well [1]? I'm not totally comfortable > with bitmasking a handle here, but if we only do this additional > check on Win7 then I'm okay with it. A version check should not be necessary. For file objects, setting both handle tag

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Bruno Oliveira
Change by Bruno Oliveira : -- nosy: +Bruno Oliveira ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-23 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as a release blocker. The last beta is scheduled for Monday. Please decide how to proceed ASAP. -- ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Steve Dower
Steve Dower added the comment: Thanks Zackery for the patch! > The problem is just console pseudohandles in Windows 7 and earlier. Should we add a version check as well [1]? I'm not totally comfortable with bitmasking a handle here, but if we only do this additional check on Win7 then I'm

[issue37549] os.dup() fails for standard streams on Windows 7

2019-08-22 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +15099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15389 ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-29 Thread Eryk Sun
Eryk Sun added the comment: > It sounds like we should probably revert to the middle ground, and > skip _raising the error_ if _Py_set_inheritable for files of type > FILE_TYPE_CHAR. The problem is just console pseudohandles in Windows 7 and earlier. Maybe it should just check for this

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-29 Thread Steve Dower
Steve Dower added the comment: > What 3.7.3 does is to skip calling _Py_set_inheritable for all files of type > FILE_TYPE_CHAR It sounds like we should probably revert to the middle ground, and skip _raising the error_ if _Py_set_inheritable for files of type FILE_TYPE_CHAR. As Victor

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-29 Thread STINNER Victor
STINNER Victor added the comment: Honestly, I'm not sure of what is the right solution for this issue. -- ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as release blocker but since there is no movement on the possible solution, I'm releasing 3.80b3 without a fix. Please resolve this by b4, I will block the last beta on this issue. -- ___ Python

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-21 Thread Sebastian Bank
Change by Sebastian Bank : -- nosy: +xflr6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +lukasz.langa, ned.deily priority: normal -> release blocker ___ Python tracker ___ ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-12 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-11 Thread Eryk Sun
Eryk Sun added the comment: > os.dup() doc says: "On Windows, when duplicating a standard stream > (0: stdin, 1: stdout, 2: stderr), the new file descriptor is > inheritable." That's not necessarily correct. For example, if stdout is a pipe or disk file: C:\>python -V Python 3.7.3

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-11 Thread STINNER Victor
STINNER Victor added the comment: Oh, os.dup() doc says: "On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: stderr), the new file descriptor is inheritable." https://docs.python.org/dev/library/os.html Maybe we should add an inheritable paramater to os.dup() in Python

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread DaveB
DaveB added the comment: Results with Python 3.7.4 on Windows 7 >>> import os, msvcrt >>> msvcrt.get_osfhandle(0) 15 >>> os.set_handle_inheritable(msvcrt.get_osfhandle(0), False) Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect >>>

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread Eryk Sun
Eryk Sun added the comment: > OSError: [WinError 87] The parameter is incorrect This error didn't originate from the C dup() call, since that would be based on errno, like `OSError: [Errno 9] Bad file descriptor`. It must come from _Py_set_inheritable. The only WINAPI call there is

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread Josh Rosenberg
Josh Rosenberg added the comment: This seems likely to have been caused by the fixes for #37267, which fixes an issue with os.dup leaving character streams inheritable (when the documentation specifies that the result must be non-inheritable). The code originally didn't try to make the

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-10 Thread DaveB
New submission from DaveB : os.dup(fd) generates an OSError for standard streams (0: stdin, 1: stdout, 2: stderr) on Windows 7. Works as expected on Windows 10. Working backwards we found the issue first appears in Python 3.7.4rc1 and 3.8.0b2 on Windows 7. Earlier releases work as