diff --git a/stdlib/2and3/_dummy_threading.pyi b/stdlib/2and3/_dummy_threading.pyi index 5d716f00f..47731cb94 100644 --- a/stdlib/2and3/_dummy_threading.pyi +++ b/stdlib/2and3/_dummy_threading.pyi @@ -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): ... diff --git a/stdlib/2and3/threading.pyi b/stdlib/2and3/threading.pyi index 5d716f00f..47731cb94 100644 --- a/stdlib/2and3/threading.pyi +++ b/stdlib/2and3/threading.pyi @@ -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): ...