From df2efe6102942770a9a37118859afd8410d4e49a Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 25 Sep 2023 20:38:48 +0300 Subject: [PATCH] Update `fcntl` to python 3.12 (#10774) --- stdlib/fcntl.pyi | 5 +++++ tests/stubtest_allowlists/linux-py312.txt | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stdlib/fcntl.pyi b/stdlib/fcntl.pyi index 6aec7515f..56fd5679a 100644 --- a/stdlib/fcntl.pyi +++ b/stdlib/fcntl.pyi @@ -101,6 +101,11 @@ if sys.platform != "win32": I_STR: int I_SWROPT: int I_UNLINK: int + + if sys.version_info >= (3, 12) and sys.platform == "linux": + FICLONE: int + FICLONERANGE: int + @overload def fcntl(__fd: FileDescriptorLike, __cmd: int, __arg: int = 0) -> int: ... @overload diff --git a/tests/stubtest_allowlists/linux-py312.txt b/tests/stubtest_allowlists/linux-py312.txt index 0ede3b23d..ff4d55bf1 100644 --- a/tests/stubtest_allowlists/linux-py312.txt +++ b/tests/stubtest_allowlists/linux-py312.txt @@ -4,8 +4,6 @@ _posixsubprocess.fork_exec (os|posix).setns (os|posix).setresgid (os|posix).setresuid -fcntl.FICLONE -fcntl.FICLONERANGE mmap.MAP_STACK resource.prlimit signal.sigtimedwait