From 56aa2088aada530400b6fdddf0f1d17ca3aaa86f Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 27 Jan 2022 13:09:29 +0200 Subject: [PATCH] Add BufferedProtocol.eof_received() (#7043) --- stdlib/asyncio/protocols.pyi | 1 + tests/stubtest_allowlists/py310.txt | 2 -- tests/stubtest_allowlists/py37.txt | 2 -- tests/stubtest_allowlists/py38.txt | 2 -- tests/stubtest_allowlists/py39.txt | 2 -- 5 files changed, 1 insertion(+), 8 deletions(-) diff --git a/stdlib/asyncio/protocols.pyi b/stdlib/asyncio/protocols.pyi index 754f02c8b..d30414b99 100644 --- a/stdlib/asyncio/protocols.pyi +++ b/stdlib/asyncio/protocols.pyi @@ -15,6 +15,7 @@ if sys.version_info >= (3, 7): class BufferedProtocol(BaseProtocol): def get_buffer(self, sizehint: int) -> bytearray: ... def buffer_updated(self, nbytes: int) -> None: ... + def eof_received(self) -> bool | None: ... class DatagramProtocol(BaseProtocol): def connection_made(self, transport: transports.DatagramTransport) -> None: ... # type: ignore[override] diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index d5d3050c1..e9205c10b 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -164,9 +164,7 @@ _imp.source_hash ast.Tuple.dims ast.main asyncio.AbstractEventLoop.connect_accepted_socket -asyncio.BufferedProtocol.eof_received asyncio.events.AbstractEventLoop.connect_accepted_socket -asyncio.protocols.BufferedProtocol.eof_received bdb.Breakpoint.clearBreakpoints distutils.dist.DistributionMetadata.set_classifiers distutils.dist.DistributionMetadata.set_keywords diff --git a/tests/stubtest_allowlists/py37.txt b/tests/stubtest_allowlists/py37.txt index baf49d887..7b0f3cc6e 100644 --- a/tests/stubtest_allowlists/py37.txt +++ b/tests/stubtest_allowlists/py37.txt @@ -89,8 +89,6 @@ collections.Sequence.index # Supporting None in end is not mandatory # Exists at runtime, but missing from stubs _dummy_thread.RLock _imp.source_hash -asyncio.BufferedProtocol.eof_received -asyncio.protocols.BufferedProtocol.eof_received contextvars.ContextVar.__class_getitem__ datetime.datetime_CAPI distutils.command.bdist_wininst diff --git a/tests/stubtest_allowlists/py38.txt b/tests/stubtest_allowlists/py38.txt index cb4d24043..3130706f0 100644 --- a/tests/stubtest_allowlists/py38.txt +++ b/tests/stubtest_allowlists/py38.txt @@ -101,8 +101,6 @@ collections.Sequence.index # Supporting None in end is not mandatory # Exists at runtime, but missing from stubs _dummy_thread.RLock _imp.source_hash -asyncio.BufferedProtocol.eof_received -asyncio.protocols.BufferedProtocol.eof_received contextvars.ContextVar.__class_getitem__ datetime.datetime_CAPI distutils.command.bdist_wininst diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index 3ff106f70..f39513daf 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -124,8 +124,6 @@ _collections_abc.MappingView.__class_getitem__ _imp.source_hash ast.Tuple.dims ast.main -asyncio.BufferedProtocol.eof_received -asyncio.protocols.BufferedProtocol.eof_received collections.AsyncIterable.__class_getitem__ collections.Awaitable.__class_getitem__ collections.Container.__class_getitem__