Skip to content

Commit 50f30d8

Browse files
committed
asyncio: add cleanup_socket to AbstractEventLoop.create_unix_server (#15742)
1 parent 536aeeb commit 50f30d8

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

stdlib/asyncio/events.pyi

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -421,18 +421,33 @@ class AbstractEventLoop:
421421
ssl_handshake_timeout: float | None = None,
422422
ssl_shutdown_timeout: float | None = None,
423423
) -> Transport | None: ...
424-
async def create_unix_server(
425-
self,
426-
protocol_factory: _ProtocolFactory,
427-
path: StrPath | None = None,
428-
*,
429-
sock: socket | None = None,
430-
backlog: int = 100,
431-
ssl: _SSLContext = None,
432-
ssl_handshake_timeout: float | None = None,
433-
ssl_shutdown_timeout: float | None = None,
434-
start_serving: bool = True,
435-
) -> Server: ...
424+
if sys.version_info >= (3, 13):
425+
async def create_unix_server(
426+
self,
427+
protocol_factory: _ProtocolFactory,
428+
path: StrPath | None = None,
429+
*,
430+
sock: socket | None = None,
431+
backlog: int = 100,
432+
ssl: _SSLContext = None,
433+
ssl_handshake_timeout: float | None = None,
434+
ssl_shutdown_timeout: float | None = None,
435+
start_serving: bool = True,
436+
cleanup_socket: bool = True,
437+
) -> Server: ...
438+
else:
439+
async def create_unix_server(
440+
self,
441+
protocol_factory: _ProtocolFactory,
442+
path: StrPath | None = None,
443+
*,
444+
sock: socket | None = None,
445+
backlog: int = 100,
446+
ssl: _SSLContext = None,
447+
ssl_handshake_timeout: float | None = None,
448+
ssl_shutdown_timeout: float | None = None,
449+
start_serving: bool = True,
450+
) -> Server: ...
436451
else:
437452
@abstractmethod
438453
async def start_tls(

0 commit comments

Comments
 (0)