[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
>>>

--

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



[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 expected.

>>> import os
>>> os.dup(1)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [WinError 87] The parameter is incorrect
>>>

--
components: Extension Modules
messages: 347627
nosy: daveb
priority: normal
severity: normal
status: open
title: os.dup() fails for standard streams on Windows 7
type: behavior
versions: Python 3.7, Python 3.8

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