Skip to content

Commit fc47f8c

Browse files
authored
[stdlib] Update asyncio.run to accept Awaitable from 3.14 (#15807)
Update asyncio.run for Python 3.14 awaitables
1 parent 3402466 commit fc47f8c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

stdlib/asyncio/runners.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ if sys.version_info >= (3, 11):
2727
else:
2828
def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = None) -> _T: ...
2929

30-
if sys.version_info >= (3, 12):
30+
if sys.version_info >= (3, 14):
31+
def run(
32+
main: Awaitable[_T], *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None
33+
) -> _T: ...
34+
35+
elif sys.version_info >= (3, 12):
3136
def run(
3237
main: Coroutine[Any, Any, _T], *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None
3338
) -> _T: ...

0 commit comments

Comments
 (0)