Skip to content

Commit d9afe22

Browse files
authored
Merge branch 'main' into doc-importlib-metadata-distributions
2 parents 14124e2 + 8704d6b commit d9afe22

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Doc/library/asyncio-stream.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,17 @@ and work with streams:
171171
.. function:: start_unix_server(client_connected_cb, path=None, \
172172
*, limit=None, sock=None, backlog=100, ssl=None, \
173173
ssl_handshake_timeout=None, \
174-
ssl_shutdown_timeout=None, start_serving=True)
174+
ssl_shutdown_timeout=None, start_serving=True, cleanup_socket=True)
175175
:async:
176176
177177
Start a Unix socket server.
178178

179179
Similar to :func:`start_server` but works with Unix sockets.
180180

181+
If *cleanup_socket* is true then the Unix socket will automatically
182+
be removed from the filesystem when the server is closed, unless the
183+
socket has been replaced after the server has been created.
184+
181185
See also the documentation of :meth:`loop.create_unix_server`.
182186

183187
.. note::
@@ -198,6 +202,9 @@ and work with streams:
198202
.. versionchanged:: 3.11
199203
Added the *ssl_shutdown_timeout* parameter.
200204

205+
.. versionchanged:: 3.13
206+
Added the *cleanup_socket* parameter.
207+
201208

202209
StreamReader
203210
============

Lib/test/test_codecs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import codecs
22
import contextlib
33
import copy
4+
import importlib
45
import io
56
import pickle
67
import os
@@ -3111,9 +3112,9 @@ def test_aliases(self):
31113112
def test_alias_modules_exist(self):
31123113
encodings_dir = os.path.dirname(encodings.__file__)
31133114
for value in encodings.aliases.aliases.values():
3114-
codec_file = os.path.join(encodings_dir, value + ".py")
3115-
self.assertTrue(os.path.isfile(codec_file),
3116-
"Codec file not found: " + codec_file)
3115+
codec_mod = f"encodings.{value}"
3116+
self.assertIsNotNone(importlib.util.find_spec(codec_mod),
3117+
f"Codec module not found: {codec_mod}")
31173118

31183119
def test_quopri_stateless(self):
31193120
# Should encode with quotetabs=True

0 commit comments

Comments
 (0)