From 62a4f75715cd516c893560853944beb278667463 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 11 May 2026 13:55:47 +0300 Subject: [PATCH] [select] Mark `select.poll` as `@final` See: ```python >>> import select >>> t = type(select.poll()) >>> t >>> class a(t): ... ... Traceback (most recent call last): File "", line 1, in class a(t): ... TypeError: type 'select.poll' is not an acceptable base type ``` --- stdlib/select.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/select.pyi b/stdlib/select.pyi index 9c529dfdcbc9..2e048e99b332 100644 --- a/stdlib/select.pyi +++ b/stdlib/select.pyi @@ -24,6 +24,7 @@ if sys.platform != "win32": # This is actually a function that returns an instance of a class. # The class is not accessible directly, and also calls itself select.poll. + @final class poll: # default value is select.POLLIN | select.POLLPRI | select.POLLOUT def register(self, fd: FileDescriptorLike, eventmask: int = 7, /) -> None: ...