Skip to content

Commit ae41747

Browse files
Add loop_factory argument to asyncio.run on 3.12+ (#9354)
1 parent 4661af9 commit ae41747

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/asyncio/runners.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ if sys.version_info >= (3, 11):
2121
def get_loop(self) -> AbstractEventLoop: ...
2222
def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = ...) -> _T: ...
2323

24-
if sys.version_info >= (3, 8):
24+
if sys.version_info >= (3, 12):
25+
def run(
26+
main: Coroutine[Any, Any, _T], *, debug: bool | None = ..., loop_factory: Callable[[], AbstractEventLoop] | None = ...
27+
) -> _T: ...
28+
29+
elif sys.version_info >= (3, 8):
2530
def run(main: Coroutine[Any, Any, _T], *, debug: bool | None = ...) -> _T: ...
2631

2732
else:

0 commit comments

Comments
 (0)