threading: update for py39 (#4087)

This commit is contained in:
Shantanu
2020-05-26 17:37:07 -07:00
committed by GitHub
parent 3eb6fb8714
commit d313e170b7
2 changed files with 12 additions and 4 deletions

View File

@@ -75,7 +75,8 @@ class Thread:
@property
def native_id(self) -> Optional[int]: ... # only available on some platforms
def is_alive(self) -> bool: ...
def isAlive(self) -> bool: ...
if sys.version_info < (3, 9):
def isAlive(self) -> bool: ...
def isDaemon(self) -> bool: ...
def setDaemon(self, daemonic: bool) -> None: ...
@@ -143,7 +144,10 @@ class Semaphore:
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ...
else:
def acquire(self, blocking: bool = ...) -> bool: ...
def release(self) -> None: ...
if sys.version_info >= (3, 9):
def release(self, n: int = ...) -> None: ...
else:
def release(self) -> None: ...
class BoundedSemaphore(Semaphore): ...