address some multiprocessing allowlist entries (#13080)

This commit is contained in:
Stephen Morton
2024-11-23 16:37:22 -08:00
committed by GitHub
parent 9614cc2d88
commit 8a485331c9
2 changed files with 32 additions and 17 deletions

View File

@@ -10,7 +10,7 @@ _LockLike: TypeAlias = Lock | RLock
class Barrier(threading.Barrier):
def __init__(
self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *ctx: BaseContext
self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *, ctx: BaseContext
) -> None: ...
class Condition:
@@ -19,12 +19,14 @@ class Condition:
def notify_all(self) -> None: ...
def wait(self, timeout: float | None = None) -> bool: ...
def wait_for(self, predicate: Callable[[], bool], timeout: float | None = None) -> bool: ...
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
def release(self) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
) -> None: ...
# These methods are copied from the lock passed to the constructor, or an
# instance of ctx.RLock() if lock was None.
def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
def release(self) -> None: ...
class Event:
def __init__(self, *, ctx: BaseContext) -> None: ...
@@ -35,12 +37,14 @@ class Event:
# Not part of public API
class SemLock:
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
def release(self) -> None: ...
def __init__(self, kind: int, value: int, maxvalue: int, *, ctx: BaseContext | None) -> None: ...
def __enter__(self) -> bool: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
) -> None: ...
# These methods are copied from the wrapped _multiprocessing.SemLock object
def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
def release(self) -> None: ...
class Lock(SemLock):
def __init__(self, *, ctx: BaseContext) -> None: ...