Add private members to stdlib threading (#590)

* Add threading._DummyThread

* Make threading.RLock a factory function, not a class

Will break code that currently uses a threading.RLock type annotation
This commit is contained in:
Alvaro Caceres
2016-10-07 15:11:47 -05:00
committed by Matthias Kramm
parent 9b092f353e
commit 92b600540e

View File

@@ -76,6 +76,10 @@ class Thread:
def setDaemon(self, daemonic: bool) -> None: ...
class _DummyThread(Thread):
pass
class Lock:
def __init__(self) -> None: ...
def __enter__(self) -> bool: ...
@@ -89,7 +93,7 @@ class Lock:
def release(self) -> None: ...
class RLock:
class _RLock:
def __init__(self) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(self, exc_type: Optional[Type[BaseException]],
@@ -102,8 +106,11 @@ class RLock:
def release(self) -> None: ...
def RLock() -> _RLock: ...
class Condition:
def __init__(self, lock: Union[Lock, RLock, None] = ...) -> None: ...
def __init__(self, lock: Union[Lock, _RLock, None] = ...) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(self, exc_type: Optional[Type[BaseException]],
exc_val: Optional[Exception],