Skip to content

Commit 182ddd9

Browse files
not-my-profileJelleZijlstra
authored andcommitted
stdlib: Add os.get_handle_inheritable & setter
1 parent aa38362 commit 182ddd9

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
@@ -662,6 +662,10 @@ def get_terminal_size(fd: int = ...) -> terminal_size: ...
662662
def get_inheritable(__fd: int) -> bool: ...
663663
def set_inheritable(__fd: int, __inheritable: bool) -> None: ...
664664

665+
if sys.platform == "win32":
666+
def get_handle_inheritable(__handle: int) -> bool: ...
667+
def set_handle_inheritable(__handle: int, __inheritable: bool) -> None: ...
668+
665669
if sys.platform != "win32":
666670
# Unix only
667671
def tcgetpgrp(__fd: int) -> int: ...

tests/stubtest_allowlists/win32.txt

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

0 commit comments

Comments
 (0)