From f8e541a371f11891e6d9204a4b81e29f843f2475 Mon Sep 17 00:00:00 2001 From: Shamil Date: Mon, 26 May 2025 23:33:00 +0300 Subject: [PATCH 1/2] gh-134664: Document cleanup_socket parameter in asyncio.start_unix_server() Document that in Python 3.13, the cleanup_socket parameter was added to asyncio.start_unix_server() with a default value of True. This parameter controls whether the Unix socket is automatically removed from the filesystem when the server is closed. --- Doc/library/asyncio-stream.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index c56166cabb9093..d2c98479c0b426 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -171,13 +171,17 @@ and work with streams: .. function:: start_unix_server(client_connected_cb, path=None, \ *, limit=None, sock=None, backlog=100, ssl=None, \ ssl_handshake_timeout=None, \ - ssl_shutdown_timeout=None, start_serving=True) + ssl_shutdown_timeout=None, start_serving=True, cleanup_socket=True) :async: Start a Unix socket server. Similar to :func:`start_server` but works with Unix sockets. + If *cleanup_socket* is true then the Unix socket will automatically + be removed from the filesystem when the server is closed, unless the + socket has been replaced after the server has been created. + See also the documentation of :meth:`loop.create_unix_server`. .. note:: @@ -198,6 +202,9 @@ and work with streams: .. versionchanged:: 3.11 Added the *ssl_shutdown_timeout* parameter. + .. versionchanged:: 3.13 + Added the *cleanup_socket* parameter with a default value of ``True``. + StreamReader ============ From 587f2d7676d277de828cb57d4a87a2043b14f70d Mon Sep 17 00:00:00 2001 From: Shamil Date: Tue, 27 May 2025 10:54:06 +0300 Subject: [PATCH 2/2] fix --- Doc/library/asyncio-stream.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index d2c98479c0b426..90c90862ca1ed3 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -203,7 +203,7 @@ and work with streams: Added the *ssl_shutdown_timeout* parameter. .. versionchanged:: 3.13 - Added the *cleanup_socket* parameter with a default value of ``True``. + Added the *cleanup_socket* parameter. StreamReader