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