Skip to content

Commit

Permalink
a couple stubtest fixes in multiprocessing (#12948)
Browse files Browse the repository at this point in the history
  • Loading branch information
tungol authored Nov 4, 2024
1 parent e37ac25 commit 9c8bc64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ ipaddress._BaseNetwork.max_prefixlen
multiprocessing.JoinableQueue
multiprocessing.Queue
multiprocessing.SimpleQueue
multiprocessing.managers.BaseManager.shutdown
multiprocessing.managers.SyncManager.Event
multiprocessing.managers.SyncManager.Lock
multiprocessing.managers.SyncManager.Namespace
multiprocessing.managers.SyncManager.RLock
multiprocessing.queues.JoinableQueue.__init__
multiprocessing.queues.Queue.__init__
multiprocessing.queues.SimpleQueue.__init__
multiprocessing.spawn._main
multiprocessing.synchronize.Barrier.__init__
multiprocessing.synchronize.Condition.acquire
multiprocessing.synchronize.Condition.release
Expand Down
3 changes: 2 additions & 1 deletion stdlib/multiprocessing/managers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ from typing_extensions import Self, TypeAlias
from .connection import Connection
from .context import BaseContext
from .shared_memory import _SLT, ShareableList as _ShareableList, SharedMemory as _SharedMemory
from .util import Finalize as _Finalize

__all__ = ["BaseManager", "SyncManager", "BaseProxy", "Token", "SharedMemoryManager"]

Expand Down Expand Up @@ -156,7 +157,7 @@ class BaseManager:
def get_server(self) -> Server: ...
def connect(self) -> None: ...
def start(self, initializer: Callable[..., object] | None = None, initargs: Iterable[Any] = ()) -> None: ...
def shutdown(self) -> None: ... # only available after start() was called
shutdown: _Finalize # only available after start() was called
def join(self, timeout: float | None = None) -> None: ... # undocumented
@property
def address(self) -> Any: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/multiprocessing/spawn.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_command_line(**kwds: Any) -> list[str]: ...
def spawn_main(pipe_handle: int, parent_pid: int | None = None, tracker_fd: int | None = None) -> None: ...

# undocumented
def _main(fd: int) -> Any: ...
def _main(fd: int, parent_sentinel: int) -> int: ...
def get_preparation_data(name: str) -> dict[str, Any]: ...

old_main_modules: list[ModuleType]
Expand Down

0 comments on commit 9c8bc64

Please sign in to comment.