From 16f43d8f3fc0dfba2af4ba50faf828d71a5dfc82 Mon Sep 17 00:00:00 2001 From: Hendrik Makait Date: Fri, 1 Sep 2023 13:59:35 +0200 Subject: [PATCH] Deprecate --- distributed/core.py | 5 +++-- distributed/tests/test_core.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/distributed/core.py b/distributed/core.py index fc8fca6f39d..6f82b4bab1e 100644 --- a/distributed/core.py +++ b/distributed/core.py @@ -656,8 +656,9 @@ def _stop_listeners(self) -> asyncio.Future: if inspect.isawaitable(future): warnings.warn( f"{type(listener)} is using an asynchronous `stop` method. " - "Support for asynchronous `Listener.stop` will be removed in a future version", - PendingDeprecationWarning, + "Support for asynchronous `Listener.stop` has been deprecated and " + "will be removed in a future version", + DeprecationWarning, ) listeners_to_stop.add(future) elif hasattr(listener, "abort_handshaking_comms"): diff --git a/distributed/tests/test_core.py b/distributed/tests/test_core.py index 4754073e458..6ac556d7685 100644 --- a/distributed/tests/test_core.py +++ b/distributed/tests/test_core.py @@ -1402,7 +1402,7 @@ class TCPAsyncListenerBackend(TCPBackend): @gen_test() async def test_async_listener_stop(monkeypatch): monkeypatch.setitem(backends, "tcp", TCPAsyncListenerBackend()) - with pytest.warns(PendingDeprecationWarning): + with pytest.warns(DeprecationWarning): async with Server({}) as s: await s.listen(0) assert s.listeners