diff --git a/stubs/waitress/waitress/channel.pyi b/stubs/waitress/waitress/channel.pyi index 8ee4ddb376f4..61f234855c89 100644 --- a/stubs/waitress/waitress/channel.pyi +++ b/stubs/waitress/waitress/channel.pyi @@ -1,4 +1,3 @@ -from _typeshed import FloatInt from collections.abc import Sequence from socket import _RetAddress, socket from threading import Condition, Lock @@ -19,7 +18,7 @@ class HTTPChannel(wasyncore.dispatcher): error_task_class: type[ErrorTask] parser_class: type[HTTPRequestParser] request: HTTPRequestParser | None - last_activity: FloatInt + last_activity: float will_close: bool close_when_flushed: bool requests: Sequence[HTTPRequestParser] @@ -29,7 +28,7 @@ class HTTPChannel(wasyncore.dispatcher): server: BaseWSGIServer adj: Adjustments outbufs: Sequence[OverflowableBuffer] - creation_time: FloatInt + creation_time: float sendbuf_len: int task_lock: Lock outbuf_lock: Condition diff --git a/stubs/waitress/waitress/wasyncore.pyi b/stubs/waitress/waitress/wasyncore.pyi index 252625fb075b..ff3092c229bd 100644 --- a/stubs/waitress/waitress/wasyncore.pyi +++ b/stubs/waitress/waitress/wasyncore.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import FloatInt, ReadableBuffer +from _typeshed import ReadableBuffer from collections.abc import Mapping from io import BytesIO from logging import Logger @@ -16,12 +16,14 @@ class ExitNow(Exception): ... def read(obj: dispatcher) -> None: ... def write(obj: dispatcher) -> None: ... def readwrite(obj: dispatcher, flags: int) -> None: ... -def poll(timeout: FloatInt = 0.0, map: _SocketMap | None = None) -> None: ... -def poll2(timeout: FloatInt = 0.0, map: _SocketMap | None = None) -> None: ... +def poll(timeout: float | int = 0.0, map: _SocketMap | None = None) -> None: ... +def poll2(timeout: float | int = 0.0, map: _SocketMap | None = None) -> None: ... poll3 = poll2 -def loop(timeout: FloatInt = 30.0, use_poll: bool = False, map: _SocketMap | None = None, count: int | None = None) -> None: ... +def loop( + timeout: float | int = 30.0, use_poll: bool = False, map: _SocketMap | None = None, count: int | None = None +) -> None: ... def compact_traceback() -> tuple[tuple[str, str, str], BaseException, BaseException, str]: ... class dispatcher: