diff --git a/stdlib/asyncio/base_events.pyi b/stdlib/asyncio/base_events.pyi index c8eef793c..71e4487ba 100644 --- a/stdlib/asyncio/base_events.pyi +++ b/stdlib/asyncio/base_events.pyi @@ -14,6 +14,9 @@ from typing_extensions import Literal if sys.version_info >= (3, 7): from contextvars import Context +if sys.version_info >= (3, 9): + __all__ = ("BaseEventLoop", "Server") +elif sys.version_info >= (3, 7): __all__ = ("BaseEventLoop",) else: __all__ = ["BaseEventLoop"] diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index 07c6b5338..994cd25a0 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -33,10 +33,12 @@ ast.Index.__new__ ast.NameConstant.__new__ ast.Num.__new__ ast.Str.__new__ +asyncio.base_events.__all__ # Fixed in 3.10.3 asyncio.Future.__init__ # Usually initialized from c object asyncio.Future._callbacks # Usually initialized from c object asyncio.futures.Future.__init__ # Usually initialized from c object asyncio.futures.Future._callbacks # Usually initialized from c object +asyncio.Server # Fixed in 3.10.3 builtins.dict.get builtins.float.__set_format__ # Internal method for CPython test suite builtins.property.__set_name__ # Doesn't actually exist diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index e3510b9fb..f09e5171a 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -15,10 +15,12 @@ ast.Index.__new__ ast.NameConstant.__new__ ast.Num.__new__ ast.Str.__new__ +asyncio.base_events.__all__ # Fixed in 3.9.11 asyncio.Future.__init__ # Usually initialized from c object asyncio.Future._callbacks # Usually initialized from c object asyncio.futures.Future.__init__ # Usually initialized from c object asyncio.futures.Future._callbacks # Usually initialized from c object +asyncio.Server # Fixed in 3.9.11 builtins.dict.get builtins.float.__set_format__ # Internal method for CPython test suite collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.