diff --git a/stdlib/asyncio/streams.pyi b/stdlib/asyncio/streams.pyi index f30c57305..804be1ca5 100644 --- a/stdlib/asyncio/streams.pyi +++ b/stdlib/asyncio/streams.pyi @@ -148,7 +148,16 @@ class StreamWriter: async def wait_closed(self) -> None: ... def get_extra_info(self, name: str, default: Any = None) -> Any: ... async def drain(self) -> None: ... - if sys.version_info >= (3, 11): + if sys.version_info >= (3, 12): + async def start_tls( + self, + sslcontext: ssl.SSLContext, + *, + server_hostname: str | None = None, + ssl_handshake_timeout: float | None = None, + ssl_shutdown_timeout: float | None = None, + ) -> None: ... + elif sys.version_info >= (3, 11): async def start_tls( self, sslcontext: ssl.SSLContext, *, server_hostname: str | None = None, ssl_handshake_timeout: float | None = None ) -> None: ... diff --git a/tests/stubtest_allowlists/py312.txt b/tests/stubtest_allowlists/py312.txt index e6867042f..84bb9c053 100644 --- a/tests/stubtest_allowlists/py312.txt +++ b/tests/stubtest_allowlists/py312.txt @@ -2,12 +2,10 @@ argparse.BooleanOptionalAction.__init__ asyncio.BaseEventLoop.create_connection asyncio.BaseEventLoop.shutdown_default_executor -asyncio.StreamWriter.start_tls asyncio.base_events.BaseEventLoop.create_connection asyncio.base_events.BaseEventLoop.shutdown_default_executor asyncio.create_eager_task_factory asyncio.eager_task_factory -asyncio.streams.StreamWriter.start_tls asyncio.tasks.__all__ asyncio.tasks.create_eager_task_factory asyncio.tasks.eager_task_factory