diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index bc2645131..462f606f5 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -1,22 +1,6 @@ # TODO: triage these (new in py313) _stat.SF_SUPPORTED _stat.SF_SYNTHETIC -fcntl.F_GETOWN_EX -fcntl.F_GET_FILE_RW_HINT -fcntl.F_GET_RW_HINT -fcntl.F_OWNER_PGRP -fcntl.F_OWNER_PID -fcntl.F_OWNER_TID -fcntl.F_SEAL_FUTURE_WRITE -fcntl.F_SETOWN_EX -fcntl.F_SET_FILE_RW_HINT -fcntl.F_SET_RW_HINT -fcntl.RWH_WRITE_LIFE_EXTREME -fcntl.RWH_WRITE_LIFE_LONG -fcntl.RWH_WRITE_LIFE_MEDIUM -fcntl.RWH_WRITE_LIFE_NONE -fcntl.RWH_WRITE_LIFE_NOT_SET -fcntl.RWH_WRITE_LIFE_SHORT mmap.MAP_NORESERVE os.POSIX_SPAWN_CLOSEFROM posix.POSIX_SPAWN_CLOSEFROM diff --git a/stdlib/fcntl.pyi b/stdlib/fcntl.pyi index ccf638205..b7995be75 100644 --- a/stdlib/fcntl.pyi +++ b/stdlib/fcntl.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import FileDescriptorLike, ReadOnlyBuffer, WriteableBuffer -from typing import Any, Literal, overload +from typing import Any, Final, Literal, overload from typing_extensions import Buffer if sys.platform != "win32": @@ -105,6 +105,24 @@ if sys.platform != "win32": FICLONE: int FICLONERANGE: int + if sys.version_info >= (3, 13) and sys.platform == "linux": + F_OWNER_TID: Final = 0 + F_OWNER_PID: Final = 1 + F_OWNER_PGRP: Final = 2 + F_SETOWN_EX: Final = 15 + F_GETOWN_EX: Final = 16 + F_SEAL_FUTURE_WRITE: Final = 16 + F_GET_RW_HINT: Final = 1035 + F_SET_RW_HINT: Final = 1036 + F_GET_FILE_RW_HINT: Final = 1037 + F_SET_FILE_RW_HINT: Final = 1038 + RWH_WRITE_LIFE_NOT_SET: Final = 0 + RWH_WRITE_LIFE_NONE: Final = 1 + RWH_WRITE_LIFE_SHORT: Final = 2 + RWH_WRITE_LIFE_MEDIUM: Final = 3 + RWH_WRITE_LIFE_LONG: Final = 4 + RWH_WRITE_LIFE_EXTREME: Final = 5 + @overload def fcntl(fd: FileDescriptorLike, cmd: int, arg: int = 0, /) -> int: ... @overload