diff --git a/stdlib/2and3/_dummy_threading.pyi b/stdlib/2and3/_dummy_threading.pyi index bd67d850f..5d716f00f 100644 --- a/stdlib/2and3/_dummy_threading.pyi +++ b/stdlib/2and3/_dummy_threading.pyi @@ -145,17 +145,7 @@ class Semaphore: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... -class BoundedSemaphore: - def __init__(self, value: int = ...) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType]) -> Optional[bool]: ... - if sys.version_info >= (3,): - def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... - else: - def acquire(self, blocking: bool = ...) -> bool: ... - def release(self) -> None: ... +class BoundedSemaphore(Semaphore): ... class Event: diff --git a/stdlib/2and3/threading.pyi b/stdlib/2and3/threading.pyi index bd67d850f..5d716f00f 100644 --- a/stdlib/2and3/threading.pyi +++ b/stdlib/2and3/threading.pyi @@ -145,17 +145,7 @@ class Semaphore: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... -class BoundedSemaphore: - def __init__(self, value: int = ...) -> None: ... - def __enter__(self) -> bool: ... - def __exit__(self, exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType]) -> Optional[bool]: ... - if sys.version_info >= (3,): - def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... - else: - def acquire(self, blocking: bool = ...) -> bool: ... - def release(self) -> None: ... +class BoundedSemaphore(Semaphore): ... class Event: diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 6460efb49..24f9f99ad 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -451,8 +451,6 @@ tempfile.SpooledTemporaryFile.__next__ tempfile.SpooledTemporaryFile.readable tempfile.SpooledTemporaryFile.seekable tempfile.SpooledTemporaryFile.writable -threading.BoundedSemaphore.__enter__ -threading.BoundedSemaphore.acquire threading.Condition.acquire threading.Condition.release threading.Lock