diff --git a/stdlib/@tests/stubtest_allowlists/linux.txt b/stdlib/@tests/stubtest_allowlists/linux.txt index e2b09917706f..d5ad8ea1d40c 100644 --- a/stdlib/@tests/stubtest_allowlists/linux.txt +++ b/stdlib/@tests/stubtest_allowlists/linux.txt @@ -137,6 +137,11 @@ _?socket.SOL_ROSE # not present on GitHub Actions runners. termios.TIOCTTYGSTRUCT +# Python built against glibc 2.42 or newer omits termios.NCC because +# no longer defines NCC. Builds using older glibc headers, +# such as those on Ubuntu 24.04, still expose it. +(termios\.NCC)? + # Only defined when Python was built against glibc 2.42 or newer (termios.B7200)? (termios.B14400)? diff --git a/stdlib/_socket.pyi b/stdlib/_socket.pyi index 759fd8265387..40f76715e394 100644 --- a/stdlib/_socket.pyi +++ b/stdlib/_socket.pyi @@ -98,6 +98,8 @@ if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "lin SO_SETFIB: Final[int] if sys.platform == "linux" and sys.version_info >= (3, 13): SO_BINDTOIFINDEX: Final[int] +if sys.platform == "linux" and sys.version_info >= (3, 15): + SO_PASSRIGHTS: Final[int] SOMAXCONN: Final[int] diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index 89b9bd866420..008a8d607211 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -234,12 +234,15 @@ if sys.platform == "linux" and sys.version_info >= (3, 15): "AT_STATX_DONT_SYNC", "AT_STATX_FORCE_SYNC", "AT_STATX_SYNC_AS_STAT", + "RWF_ATOMIC", + "RWF_DONTCACHE", "STATX_ATIME", "STATX_BASIC_STATS", "STATX_BLOCKS", "STATX_BTIME", "STATX_CTIME", "STATX_DIOALIGN", + "STATX_DIO_READ_ALIGN", "STATX_GID", "STATX_INO", "STATX_MNT_ID", @@ -248,8 +251,10 @@ if sys.platform == "linux" and sys.version_info >= (3, 15): "STATX_MTIME", "STATX_NLINK", "STATX_SIZE", + "STATX_SUBVOL", "STATX_TYPE", "STATX_UID", + "STATX_WRITE_ATOMIC", "statx", "statx_result", ] @@ -703,12 +708,15 @@ if sys.platform == "linux" and sys.version_info >= (3, 15): AT_STATX_DONT_SYNC: Final[int] AT_STATX_FORCE_SYNC: Final[int] AT_STATX_SYNC_AS_STAT: Final[int] + RWF_ATOMIC: Final[int] + RWF_DONTCACHE: Final[int] STATX_ATIME: Final[int] STATX_BASIC_STATS: Final[int] STATX_BLOCKS: Final[int] STATX_BTIME: Final[int] STATX_CTIME: Final[int] STATX_DIOALIGN: Final[int] + STATX_DIO_READ_ALIGN: Final[int] STATX_GID: Final[int] STATX_INO: Final[int] STATX_MNT_ID: Final[int] @@ -717,8 +725,10 @@ if sys.platform == "linux" and sys.version_info >= (3, 15): STATX_MTIME: Final[int] STATX_NLINK: Final[int] STATX_SIZE: Final[int] + STATX_SUBVOL: Final[int] STATX_TYPE: Final[int] STATX_UID: Final[int] + STATX_WRITE_ATOMIC: Final[int] if sys.platform != "win32": O_FSYNC: Final[int] @@ -1408,6 +1418,18 @@ if sys.platform == "linux" and sys.version_info >= (3, 15): def stx_dio_mem_align(self) -> int | None: ... @property def stx_dio_offset_align(self) -> int | None: ... + @property + def stx_subvol(self) -> int | None: ... + @property + def stx_atomic_write_unit_min(self) -> int | None: ... + @property + def stx_atomic_write_unit_max(self) -> int | None: ... + @property + def stx_atomic_write_segments_max(self) -> int | None: ... + @property + def stx_dio_read_offset_align(self) -> int | None: ... + @property + def stx_atomic_write_unit_max_opt(self) -> int | None: ... def statx( path: FileDescriptorOrPath, mask: int, *, flags: int = 0, dir_fd: int | None = None, follow_symlinks: bool = True diff --git a/stdlib/posix.pyi b/stdlib/posix.pyi index 36bb5be18e88..c8bbc098b0b0 100644 --- a/stdlib/posix.pyi +++ b/stdlib/posix.pyi @@ -272,11 +272,14 @@ if sys.platform != "win32": AT_STATX_DONT_SYNC as AT_STATX_DONT_SYNC, AT_STATX_FORCE_SYNC as AT_STATX_FORCE_SYNC, AT_STATX_SYNC_AS_STAT as AT_STATX_SYNC_AS_STAT, + RWF_ATOMIC as RWF_ATOMIC, + RWF_DONTCACHE as RWF_DONTCACHE, STATX_ATIME as STATX_ATIME, STATX_BASIC_STATS as STATX_BASIC_STATS, STATX_BLOCKS as STATX_BLOCKS, STATX_BTIME as STATX_BTIME, STATX_CTIME as STATX_CTIME, + STATX_DIO_READ_ALIGN as STATX_DIO_READ_ALIGN, STATX_DIOALIGN as STATX_DIOALIGN, STATX_GID as STATX_GID, STATX_INO as STATX_INO, @@ -286,8 +289,10 @@ if sys.platform != "win32": STATX_MTIME as STATX_MTIME, STATX_NLINK as STATX_NLINK, STATX_SIZE as STATX_SIZE, + STATX_SUBVOL as STATX_SUBVOL, STATX_TYPE as STATX_TYPE, STATX_UID as STATX_UID, + STATX_WRITE_ATOMIC as STATX_WRITE_ATOMIC, _clearenv as _clearenv, statx as statx, statx_result as statx_result, diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index e8d8f1a0d424..948092d3ce18 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -961,6 +961,11 @@ if sys.platform == "linux" and sys.version_info >= (3, 13): __all__ += ["NI_IDN", "SO_BINDTOIFINDEX"] +if sys.platform == "linux" and sys.version_info >= (3, 15): + from _socket import SO_PASSRIGHTS as SO_PASSRIGHTS + + __all__ += ["SO_PASSRIGHTS"] + if sys.version_info >= (3, 12): from _socket import ( IP_ADD_SOURCE_MEMBERSHIP as IP_ADD_SOURCE_MEMBERSHIP,