diff --git a/stdlib/grp.pyi b/stdlib/grp.pyi index 5ea7500b3..4b66b84b6 100644 --- a/stdlib/grp.pyi +++ b/stdlib/grp.pyi @@ -1,11 +1,13 @@ import sys from _typeshed import structseq from typing import Any -from typing_extensions import final +from typing_extensions import Final, final if sys.platform != "win32": @final class struct_group(structseq[Any], tuple[str, str | None, int, list[str]]): + if sys.version_info >= (3, 10): + __match_args__: Final = ("gr_name", "gr_passwd", "gr_gid", "gr_mem") @property def gr_name(self) -> str: ... @property diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index f88f3a87e..2ef781bbe 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -920,6 +920,8 @@ else: if sys.platform != "darwin": @final class waitid_result(structseq[int], tuple[int, int, int, int, int]): + if sys.version_info >= (3, 10): + __match_args__: Final = ("si_pid", "si_uid", "si_signo", "si_status", "si_code") @property def si_pid(self) -> int: ... @property @@ -977,6 +979,8 @@ else: if sys.platform != "win32": @final class sched_param(structseq[int], tuple[int]): + if sys.version_info >= (3, 10): + __match_args__: Final = ("sched_priority",) def __new__(cls: type[Self], sched_priority: int) -> Self: ... @property def sched_priority(self) -> int: ... diff --git a/stdlib/pwd.pyi b/stdlib/pwd.pyi index 84f6dc5cc..80813479d 100644 --- a/stdlib/pwd.pyi +++ b/stdlib/pwd.pyi @@ -1,11 +1,13 @@ import sys from _typeshed import structseq from typing import Any -from typing_extensions import final +from typing_extensions import Final, final if sys.platform != "win32": @final class struct_passwd(structseq[Any], tuple[str, str, int, int, str, str, str]): + if sys.version_info >= (3, 10): + __match_args__: Final = ("pw_name", "pw_passwd", "pw_uid", "pw_gid", "pw_gecos", "pw_dir", "pw_shell") @property def pw_name(self) -> str: ... @property diff --git a/stdlib/resource.pyi b/stdlib/resource.pyi index 427f4995e..f2e979ff8 100644 --- a/stdlib/resource.pyi +++ b/stdlib/resource.pyi @@ -1,7 +1,7 @@ import sys from _typeshed import structseq from typing import overload -from typing_extensions import final +from typing_extensions import Final, final if sys.platform != "win32": RLIMIT_AS: int @@ -29,6 +29,25 @@ if sys.platform != "win32": class struct_rusage( structseq[float], tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int] ): + if sys.version_info >= (3, 10): + __match_args__: Final = ( + "ru_utime", + "ru_stime", + "ru_maxrss", + "ru_ixrss", + "ru_idrss", + "ru_isrss", + "ru_minflt", + "ru_majflt", + "ru_nswap", + "ru_inblock", + "ru_oublock", + "ru_msgsnd", + "ru_msgrcv", + "ru_nsignals", + "ru_nvcsw", + "ru_nivcsw", + ) @property def ru_utime(self) -> float: ... @property diff --git a/stdlib/signal.pyi b/stdlib/signal.pyi index 632539bf7..2defe7995 100644 --- a/stdlib/signal.pyi +++ b/stdlib/signal.pyi @@ -3,7 +3,7 @@ from _typeshed import structseq from enum import IntEnum from types import FrameType from typing import Any, Callable, Iterable, Union -from typing_extensions import final +from typing_extensions import Final, final NSIG: int @@ -148,6 +148,8 @@ else: SIGRTMIN: Signals @final class struct_siginfo(structseq[int], tuple[int, int, int, int, int, int, int]): + if sys.version_info >= (3, 10): + __match_args__: Final = ("si_signo", "si_code", "si_errno", "si_pid", "si_uid", "si_status", "si_band") @property def si_signo(self) -> int: ... @property diff --git a/stdlib/spwd.pyi b/stdlib/spwd.pyi index 82d9b8dbf..27b1061e1 100644 --- a/stdlib/spwd.pyi +++ b/stdlib/spwd.pyi @@ -1,11 +1,23 @@ import sys from _typeshed import structseq from typing import Any -from typing_extensions import final +from typing_extensions import Final, final if sys.platform != "win32": @final class struct_spwd(structseq[Any], tuple[str, str, int, int, int, int, int, int, int]): + if sys.version_info >= (3, 10): + __match_args__: Final = ( + "sp_namp", + "sp_pwdp", + "sp_lstchg", + "sp_min", + "sp_max", + "sp_warn", + "sp_inact", + "sp_expire", + "sp_flag", + ) @property def sp_namp(self) -> str: ... @property