mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add fcntl constants for 3.13 (#12389)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user