From fdce887b9479a4c8a69ea040145f276caa28ce0e Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 18 Jun 2024 15:59:43 +0200 Subject: [PATCH] Add missing struct_spwd fields (#12158) --- stdlib/@tests/stubtest_allowlists/linux-py310.txt | 4 ---- stdlib/@tests/stubtest_allowlists/linux-py311.txt | 4 ---- stdlib/@tests/stubtest_allowlists/linux-py312.txt | 4 ---- stdlib/@tests/stubtest_allowlists/linux-py38.txt | 4 ---- stdlib/@tests/stubtest_allowlists/linux-py39.txt | 4 ---- stdlib/spwd.pyi | 5 +++++ 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/linux-py310.txt b/stdlib/@tests/stubtest_allowlists/linux-py310.txt index 9e3c22e70..6f3574dc3 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py310.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py310.txt @@ -1,6 +1,2 @@ -# Exists at runtime, but missing from stubs -spwd.struct_spwd.sp_nam -spwd.struct_spwd.sp_pwd - # doesn't exist on linux msilib(.[a-z]+)? diff --git a/stdlib/@tests/stubtest_allowlists/linux-py311.txt b/stdlib/@tests/stubtest_allowlists/linux-py311.txt index 9e3c22e70..6f3574dc3 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py311.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py311.txt @@ -1,6 +1,2 @@ -# Exists at runtime, but missing from stubs -spwd.struct_spwd.sp_nam -spwd.struct_spwd.sp_pwd - # doesn't exist on linux msilib(.[a-z]+)? diff --git a/stdlib/@tests/stubtest_allowlists/linux-py312.txt b/stdlib/@tests/stubtest_allowlists/linux-py312.txt index 9e3c22e70..6f3574dc3 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py312.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py312.txt @@ -1,6 +1,2 @@ -# Exists at runtime, but missing from stubs -spwd.struct_spwd.sp_nam -spwd.struct_spwd.sp_pwd - # doesn't exist on linux msilib(.[a-z]+)? diff --git a/stdlib/@tests/stubtest_allowlists/linux-py38.txt b/stdlib/@tests/stubtest_allowlists/linux-py38.txt index 650fab4ea..cf282ef1e 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py38.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py38.txt @@ -2,9 +2,5 @@ # while being inspected by stubtest. Fixed in Python 3.10. select.epoll.register -# Exists at runtime, but missing from stubs -spwd.struct_spwd.sp_nam -spwd.struct_spwd.sp_pwd - # doesn't exist on linux msilib(.[a-z]+)? diff --git a/stdlib/@tests/stubtest_allowlists/linux-py39.txt b/stdlib/@tests/stubtest_allowlists/linux-py39.txt index 650fab4ea..cf282ef1e 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py39.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py39.txt @@ -2,9 +2,5 @@ # while being inspected by stubtest. Fixed in Python 3.10. select.epoll.register -# Exists at runtime, but missing from stubs -spwd.struct_spwd.sp_nam -spwd.struct_spwd.sp_pwd - # doesn't exist on linux msilib(.[a-z]+)? diff --git a/stdlib/spwd.pyi b/stdlib/spwd.pyi index 67ad3bfc7..3a5d39997 100644 --- a/stdlib/spwd.pyi +++ b/stdlib/spwd.pyi @@ -36,6 +36,11 @@ if sys.platform != "win32": def sp_expire(self) -> int: ... @property def sp_flag(self) -> int: ... + # Deprecated aliases below. + @property + def sp_nam(self) -> str: ... + @property + def sp_pwd(self) -> str: ... def getspall() -> list[struct_spwd]: ... def getspnam(arg: str, /) -> struct_spwd: ...