mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
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:
committed by
Matthias Kramm
parent
9b092f353e
commit
92b600540e
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user