Skip to content

Commit 7beb361

Browse files
stdlib: Add os.get_handle_inheritable & setter
1 parent 7591379 commit 7beb361

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stdlib/os/__init__.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,10 @@ def get_terminal_size(fd: int = ...) -> terminal_size: ...
660660
def get_inheritable(__fd: int) -> bool: ...
661661
def set_inheritable(__fd: int, __inheritable: bool) -> None: ...
662662

663+
if sys.platform == "win32":
664+
def get_handle_inheritable(__handle: int) -> bool: ...
665+
def set_handle_inheritable(__handle: int, __inheritable: bool) -> None: ...
666+
663667
if sys.platform != "win32":
664668
# Unix only
665669
def tcgetpgrp(__fd: int) -> int: ...

tests/stubtest_allowlists/win32.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ distutils.msvccompiler.MSVCCompiler.manifest_get_embed_info
7070
distutils.msvccompiler.MSVCCompiler.manifest_setup_ldargs
7171
distutils.msvccompiler.OldMSVCCompiler
7272
msvcrt.SetErrorMode
73-
os.get_handle_inheritable
74-
os.set_handle_inheritable
7573
socket.MsgFlag.MSG_BCAST
7674
socket.MsgFlag.MSG_MCAST
7775
ssl.SSLSocket.recvmsg

0 commit comments

Comments
 (0)