Skip to content

Commit 0c7fc30

Browse files
committed
fix: resolve CI failures on #1743 (attempt 1)
1 parent 5c52131 commit 0c7fc30

3 files changed

Lines changed: 4 additions & 47 deletions

File tree

‎setup.py‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎src/zeroconf/_listener.pxd‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ cdef bint TYPE_CHECKING
1414

1515
cdef cython.uint _MAX_MSG_ABSOLUTE
1616
cdef cython.uint _RECENT_PACKETS_MAX
17-
cdef cython.uint _DUPLICATE_PACKET_SUPPRESSION_INTERVAL
1817

1918

2019
cdef class AsyncListener:

‎tests/conftest.py‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,12 @@ def run_isolated():
3636

3737
@pytest.fixture
3838
def disable_duplicate_packet_suppression() -> Generator[None]:
39-
"""Disable duplicate packet suppression.
40-
41-
Wraps `_process_datagram_at_time` so the recency window is cleared
42-
before each call, which reaches both pure-Python and Cython builds —
43-
a const-only patch never reaches the hot path because `_listener`
44-
rebinds the interval at module scope, and the rebound name is
45-
cdef'd in `_listener.pxd` for the C-int compare on hot packets.
46-
"""
47-
orig = _listener.AsyncListener._process_datagram_at_time
48-
49-
def _clear_then_process(self, *args, **kwargs):
50-
self._recent_packets.clear()
51-
return orig(self, *args, **kwargs)
52-
39+
"""Disable duplicate packet suppression."""
40+
# _listener rebinds the interval at module scope, so const-only
41+
# patching does not reach the hot path.
5342
with (
5443
patch.object(const, "_DUPLICATE_PACKET_SUPPRESSION_INTERVAL", 0),
55-
patch.object(_listener.AsyncListener, "_process_datagram_at_time", _clear_then_process),
44+
patch.object(_listener, "_DUPLICATE_PACKET_SUPPRESSION_INTERVAL", 0),
5645
):
5746
yield
5847

0 commit comments

Comments
 (0)