From 7d4ba7ccba91437b43db606d947fa76b74be3636 Mon Sep 17 00:00:00 2001 From: Matthew Hawn Date: Tue, 4 Feb 2025 00:53:32 +0000 Subject: [PATCH] Fix CI/CD errors --- zmq/asyncio.py | 5 +++-- zmq/sugar/socket.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zmq/asyncio.py b/zmq/asyncio.py index 503cc23eb..0b422316a 100644 --- a/zmq/asyncio.py +++ b/zmq/asyncio.py @@ -15,7 +15,7 @@ from weakref import WeakKeyDictionary import zmq as _zmq -from zmq import _future +from zmq import _future, Socket as _Socket from zmq.backend import ZMQPoller # registry of asyncio loop : selector thread @@ -141,6 +141,7 @@ class Socket(_AsyncIO, _future._AsyncSocket): _poller_class = Poller _zmqpoller: ZMQPoller | None = None + _shadow_sock: _Socket def _get_selector(self, io_loop=None): if io_loop is None: @@ -179,7 +180,7 @@ def _update_handler(self, state: int): """ if self._zmqpoller is not None: self._zmqpoller.modify(self._shadow_sock, state) - super()._update_handler(state) + super()._update_handler(state) # type: ignore Poller._socket_class = Socket diff --git a/zmq/sugar/socket.py b/zmq/sugar/socket.py index a4a906b53..fe4fcadb0 100644 --- a/zmq/sugar/socket.py +++ b/zmq/sugar/socket.py @@ -395,7 +395,7 @@ def fileno(self) -> int: .. versionadded:: 17.0 """ - return self.FD + return cast(int, self.FD) # FIXME: On windows this is not an int def subscribe(self, topic: str | bytes) -> None: """Subscribe to a topic