From 3da82f94f886ba180d9affb86d0238345bf92f7b Mon Sep 17 00:00:00 2001 From: Isaac Bell <251653520+icb08@users.noreply.github.com> Date: Sat, 14 Nov 2026 18:35:23 +0000 Subject: [PATCH 1/2] Add __set_name__ method to property __set_name__ is a built-in method of the property built-in, present from 3.10+ --- stdlib/builtins.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index db084758044e..1442f0536f3b 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1625,6 +1625,7 @@ class property: fdel: Callable[[Any], None] | None = None, doc: str | None = None, ) -> None: ... + def __set_name__(self, owner: type, name: str, /) -> None: ... def getter(self, fget: Callable[[Any], Any], /) -> property: ... def setter(self, fset: Callable[[Any, Any], None], /) -> property: ... def deleter(self, fdel: Callable[[Any], None], /) -> property: ... From dbd472d0da4060495fe7b6467884eb8b964e29ea Mon Sep 17 00:00:00 2001 From: Isaac Bell <251653520+icb08@users.noreply.github.com> Date: Sat, 14 Nov 2026 18:51:16 +0000 Subject: [PATCH 2/2] Remove property.__set_name__ from allowlist --- stdlib/@tests/stubtest_allowlists/common.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index 699fe63c3b4b..2b758b24365b 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -193,7 +193,6 @@ asyncio.locks.Condition.locked asyncio.locks.Condition.release builtins.memoryview.__contains__ # C type that implements __getitem__ -builtins.property.__set_name__ # Doesn't actually exist builtins.reveal_locals # Builtins that type checkers pretends exist builtins.reveal_type # Builtins that type checkers pretends exist