Skip to content

Commit b33896b

Browse files
authored
asyncio.run: fix type of debug (#4567)
1 parent 3d3dee9 commit b33896b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

stdlib/3/asyncio/runners.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import sys
22

33
if sys.version_info >= (3, 7):
4-
from typing import Awaitable, TypeVar
4+
from typing import Awaitable, Optional, TypeVar
55

66
_T = TypeVar("_T")
7-
def run(main: Awaitable[_T], *, debug: bool = ...) -> _T: ...
7+
if sys.version_info >= (3, 8):
8+
def run(main: Awaitable[_T], *, debug: Optional[bool] = ...) -> _T: ...
9+
else:
10+
def run(main: Awaitable[_T], *, debug: bool = ...) -> _T: ...

tests/stubtest_whitelists/py38.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ asyncio.events.AbstractEventLoop.sock_sendfile
1313
asyncio.futures.Future.__init__
1414
asyncio.futures.Future._callbacks
1515
asyncio.proactor_events._ProactorBasePipeTransport.__del__
16+
asyncio.run # Bugfix involving this was backported to 3.8
17+
asyncio.runners.run # It just hasn't been released yet
1618
asyncio.threads # Added in Python 3.9
1719
builtins.dict.get
1820
collections.AsyncGenerator.ag_await

0 commit comments

Comments
 (0)