Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions stdlib/@tests/stubtest_allowlists/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ ntpath.join
# Allowlist entries that cannot or should not be fixed; >= 3.13
# =============================================================

# `cleanup_socket` was added in 3.13 to the concrete `_UnixSelectorEventLoop.create_unix_server`,
# not to the abstract `AbstractEventLoop.create_unix_server`. The stub adds it on the abstract
# method so code typing the loop as `AbstractEventLoop` can still pass `cleanup_socket=...`. See #15742.
asyncio.events.AbstractEventLoop.create_unix_server

_pyrepl\..+ # The internal implementation of the REPL on py313+; not for public consumption
codecs.backslashreplace_errors # Runtime incorrectly has `self`
codecs.ignore_errors # Runtime incorrectly has `self`
Expand Down
5 changes: 5 additions & 0 deletions stdlib/@tests/stubtest_allowlists/py314.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ multiprocessing.managers._BaseDictProxy.__reversed__
# Allowlist entries that cannot or should not be fixed; >= 3.13
# =============================================================

# `cleanup_socket` was added in 3.13 to the concrete `_UnixSelectorEventLoop.create_unix_server`,
# not to the abstract `AbstractEventLoop.create_unix_server`. The stub adds it on the abstract
# method so code typing the loop as `AbstractEventLoop` can still pass `cleanup_socket=...`. See #15742.
asyncio.events.AbstractEventLoop.create_unix_server

_pyrepl\..+ # The internal implementation of the REPL on py313+; not for public consumption
codecs.backslashreplace_errors # Runtime incorrectly has `self`
codecs.ignore_errors # Runtime incorrectly has `self`
Expand Down
5 changes: 5 additions & 0 deletions stdlib/@tests/stubtest_allowlists/py315.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ types.UnionType.__qualname__
# Allowlist entries that cannot or should not be fixed; >= 3.13
# =============================================================

# `cleanup_socket` was added in 3.13 to the concrete `_UnixSelectorEventLoop.create_unix_server`,
# not to the abstract `AbstractEventLoop.create_unix_server`. The stub adds it on the abstract
# method so code typing the loop as `AbstractEventLoop` can still pass `cleanup_socket=...`. See #15742.
asyncio.events.AbstractEventLoop.create_unix_server

_pyrepl\..+ # The internal implementation of the REPL on py313+; not for public consumption
codecs.backslashreplace_errors # Runtime incorrectly has `self`
codecs.ignore_errors # Runtime incorrectly has `self`
Expand Down
35 changes: 26 additions & 9 deletions stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,20 @@ class AbstractEventLoop:
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
) -> Transport | None: ...
else:
@abstractmethod
async def start_tls(
self,
transport: BaseTransport,
protocol: BaseProtocol,
sslcontext: ssl.SSLContext,
*,
server_side: bool = False,
server_hostname: str | None = None,
ssl_handshake_timeout: float | None = None,
) -> Transport | None: ...

if sys.version_info >= (3, 13):
async def create_unix_server(
self,
protocol_factory: _ProtocolFactory,
Expand All @@ -432,19 +446,22 @@ class AbstractEventLoop:
ssl_handshake_timeout: float | None = None,
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
cleanup_socket: bool = True,
) -> Server: ...
else:
@abstractmethod
async def start_tls(
elif sys.version_info >= (3, 11):
async def create_unix_server(
self,
transport: BaseTransport,
protocol: BaseProtocol,
sslcontext: ssl.SSLContext,
protocol_factory: _ProtocolFactory,
path: StrPath | None = None,
*,
server_side: bool = False,
server_hostname: str | None = None,
sock: socket | None = None,
backlog: int = 100,
ssl: _SSLContext = None,
ssl_handshake_timeout: float | None = None,
) -> Transport | None: ...
ssl_shutdown_timeout: float | None = None,
start_serving: bool = True,
) -> Server: ...
else:
async def create_unix_server(
self,
protocol_factory: _ProtocolFactory,
Expand Down
Loading