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

@@ -16,7 +16,6 @@ http.client.HTTPConnection.response_class # the actual type at runtime is abc.A
importlib.abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
importlib.abc.MetaPathFinder.find_spec # Not defined on the actual class, but expected to exist.
importlib.abc.PathEntryFinder.find_spec # Not defined on the actual class, but expected to exist.
select.poll # Depends on configuration
socketserver.BaseServer.fileno # implemented in derived classes
socketserver.BaseServer.get_request # implemented in derived classes
socketserver.BaseServer.server_bind # implemented in derived classes

View File

@@ -44,6 +44,7 @@ curses.has_key # stubtest gets confused because this is both a module and a fun
multiprocessing.popen_spawn_win32 # exists on Darwin but fails to import
readline.append_history_file # Only available if compiled with GNU readline, not editline
select.kqueue.__init__ # default C signature is wrong
select.poll # Actually a function; we have a class so it can be used as a type
# Some of these exist on non-windows, but they are useless and this is not intended
stat.FILE_ATTRIBUTE_[A-Z_]+

View File

@@ -25,6 +25,7 @@ curses.LINES # Initialized only after initscr call
curses.has_key # stubtest gets confused because this is both a module and a function in curses
fcntl.I_[A-Z0-9_]+ # Platform differences that cannot be captured by the type system
multiprocessing.popen_spawn_win32 # exists on Linux but fails to import
select.poll # Actually a function; we have a class so it can be used as a type
# These seem like they should be available on Linux, but they're not
# on GitHub Actions runners for some reason.

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, /