From d77d0fb7f78eb943c5caef1f4739daa31c095aa8 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Sat, 25 Jul 2026 11:53:41 +0530 Subject: [PATCH] gh-120866: Document behavior change of asyncio.Server.wait_closed() in 3.12 --- Doc/library/asyncio-eventloop.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 6b5244abe427cd3..d24c8420ef8920c 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -1873,6 +1873,12 @@ Do not instantiate the :class:`Server` class directly. Wait until the :meth:`close` method completes and all active connections have finished. + .. versionchanged:: 3.12 + ``wait_closed()`` now waits until the server is closed and + all active connections have finished. Previously, it returned + immediately if the server was already closed, even if + connections were still active. + .. attribute:: sockets List of socket-like objects, ``asyncio.trsock.TransportSocket``, which