diff --git a/stdlib/asyncio/tasks.pyi b/stdlib/asyncio/tasks.pyi index 2027e04b9..765fb67be 100644 --- a/stdlib/asyncio/tasks.pyi +++ b/stdlib/asyncio/tasks.pyi @@ -11,6 +11,45 @@ from .futures import Future if sys.version_info >= (3, 9): from types import GenericAlias +if sys.version_info >= (3, 7): + __all__ = ( + "Task", + "create_task", + "FIRST_COMPLETED", + "FIRST_EXCEPTION", + "ALL_COMPLETED", + "wait", + "wait_for", + "as_completed", + "sleep", + "gather", + "shield", + "ensure_future", + "run_coroutine_threadsafe", + "current_task", + "all_tasks", + "_register_task", + "_unregister_task", + "_enter_task", + "_leave_task", + ) +else: + __all__ = [ + "Task", + "FIRST_COMPLETED", + "FIRST_EXCEPTION", + "ALL_COMPLETED", + "wait", + "wait_for", + "as_completed", + "sleep", + "async", + "gather", + "shield", + "ensure_future", + "run_coroutine_threadsafe", + ] + _T = TypeVar("_T") _T1 = TypeVar("_T1") _T2 = TypeVar("_T2")