From b9e8a38cedd8fabaeecd54bee3c2d673d43fc270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 3 May 2025 09:10:24 +0200 Subject: [PATCH] fix: fix signature of `AsyncListener._respond_query()` Fix `AsyncListener._respond_query()` to use `DNSIncoming` type for the `msg` argument, matching `handle_query_or_defer()`. This fixes the following error with Cython 3.1.0rc1: ``` Error compiling Cython file: ------------------------------------------------------------ ... def _cancel_any_timers_for_addr(self, addr: _str) -> None: """Cancel any future truncated packet timers for the address.""" if addr in self._timers: self._timers.pop(addr).cancel() def _respond_query( ^ ------------------------------------------------------------ src/zeroconf/_listener.py:225:4: Signature not compatible with previous declaration Error compiling Cython file: ------------------------------------------------------------ ... object port, object transport, tuple v6_flow_scope ) cpdef _respond_query( ^ ------------------------------------------------------------ src/zeroconf/_listener.pxd:51:24: Previous declaration is here ``` --- src/zeroconf/_listener.pxd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zeroconf/_listener.pxd b/src/zeroconf/_listener.pxd index 20084b47..4cbc5d00 100644 --- a/src/zeroconf/_listener.pxd +++ b/src/zeroconf/_listener.pxd @@ -50,7 +50,7 @@ cdef class AsyncListener: cpdef _respond_query( self, - object msg, + DNSIncoming msg, object addr, object port, object transport,