diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index 5938901b6..fa4c55011 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -1101,3 +1101,4 @@ if sys.version_info >= (3, 12) and sys.platform == "linux": CLONE_THREAD: int CLONE_VM: int def unshare(flags: int) -> None: ... + def setns(fd: FileDescriptorLike, nstype: int = 0) -> None: ... diff --git a/stdlib/posix.pyi b/stdlib/posix.pyi index 3f327e110..ab6bf2e63 100644 --- a/stdlib/posix.pyi +++ b/stdlib/posix.pyi @@ -344,6 +344,7 @@ if sys.platform != "win32": CLONE_SYSVSEM as CLONE_SYSVSEM, CLONE_THREAD as CLONE_THREAD, CLONE_VM as CLONE_VM, + setns as setns, unshare as unshare, ) diff --git a/tests/stubtest_allowlists/linux-py312.txt b/tests/stubtest_allowlists/linux-py312.txt index 9423e9413..7463b5ea2 100644 --- a/tests/stubtest_allowlists/linux-py312.txt +++ b/tests/stubtest_allowlists/linux-py312.txt @@ -1,6 +1,5 @@ _?curses.color_pair _posixsubprocess.fork_exec -(os|posix).setns resource.prlimit signal.sigtimedwait signal.sigwaitinfo