11import sys
22from _typeshed import Unused
3- from collections .abc import Callable , Coroutine
3+ from collections .abc import Awaitable , Callable , Coroutine
44from contextvars import Context
55from typing import Any , TypeVar , final
66from typing_extensions import Self
@@ -22,8 +22,10 @@ if sys.version_info >= (3, 11):
2222 def __exit__ (self , exc_type : Unused , exc_val : Unused , exc_tb : Unused ) -> None : ...
2323 def close (self ) -> None : ...
2424 def get_loop (self ) -> AbstractEventLoop : ...
25- def run (self , coro : Coroutine [Any , Any , _T ], * , context : Context | None = None ) -> _T : ...
26-
25+ if sys .version_info >= (3 , 14 ):
26+ def run (self , coro : Awaitable [_T ], * , context : Context | None = None ) -> _T : ...
27+ else :
28+ def run (self , coro : Coroutine [Any , Any , _T ], * , context : Context | None = None ) -> _T : ...
2729if sys .version_info >= (3 , 12 ):
2830 def run (
2931 main : Coroutine [Any , Any , _T ], * , debug : bool | None = None , loop_factory : Callable [[], AbstractEventLoop ] | None = None
0 commit comments