select.poll is not available on windows (#13243)

This commit is contained in:
Stephen Morton
2024-12-27 20:04:24 -08:00
committed by GitHub
parent a581069171
commit b29e26a628
4 changed files with 10 additions and 6 deletions

View File

@@ -22,11 +22,14 @@ if sys.platform != "win32":
POLLWRBAND: int
POLLWRNORM: int
class poll:
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
def modify(self, fd: FileDescriptorLike, eventmask: int) -> None: ...
def unregister(self, fd: FileDescriptorLike) -> None: ...
def poll(self, timeout: float | None = ...) -> list[tuple[int, int]]: ...
# This is actually a function that returns an instance of a class.
# The class is not accessible directly, and also calls itself select.poll.
class poll:
# default value is select.POLLIN | select.POLLPRI | select.POLLOUT
def register(self, fd: FileDescriptorLike, eventmask: int = 7, /) -> None: ...
def modify(self, fd: FileDescriptorLike, eventmask: int, /) -> None: ...
def unregister(self, fd: FileDescriptorLike, /) -> None: ...
def poll(self, timeout: float | None = None, /) -> list[tuple[int, int]]: ...
def select(
rlist: Iterable[Any], wlist: Iterable[Any], xlist: Iterable[Any], timeout: float | None = None, /