mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add multiprocessing.popen_spawn_win32 submodule (#8428)
This commit is contained in:
30
stdlib/multiprocessing/popen_spawn_win32.pyi
Normal file
30
stdlib/multiprocessing/popen_spawn_win32.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
import sys
|
||||
from multiprocessing.process import BaseProcess
|
||||
from typing import ClassVar
|
||||
|
||||
from .util import Finalize
|
||||
|
||||
if sys.platform == "win32":
|
||||
__all__ = ["Popen"]
|
||||
|
||||
TERMINATE: int
|
||||
WINEXE: bool
|
||||
WINSERVICE: bool
|
||||
WINENV: bool
|
||||
|
||||
class Popen:
|
||||
finalizer: Finalize
|
||||
method: ClassVar[str]
|
||||
pid: int
|
||||
returncode: int | None
|
||||
sentinel: int
|
||||
|
||||
def __init__(self, process_obj: BaseProcess) -> None: ...
|
||||
def duplicate_for_child(self, handle: int) -> int: ...
|
||||
def wait(self, timeout: float | None = ...) -> int | None: ...
|
||||
def poll(self) -> int | None: ...
|
||||
def terminate(self) -> None: ...
|
||||
|
||||
kill = terminate
|
||||
|
||||
def close(self) -> None: ...
|
||||
@@ -27,9 +27,11 @@ def dump(obj, file, protocol: Any | None = ...) -> None: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
if sys.version_info >= (3, 8):
|
||||
def duplicate(handle, target_process: Any | None = ..., inheritable: bool = ..., *, source_process: Any | None = ...): ...
|
||||
def duplicate(
|
||||
handle: int, target_process: int | None = ..., inheritable: bool = ..., *, source_process: int | None = ...
|
||||
) -> int: ...
|
||||
else:
|
||||
def duplicate(handle, target_process: Any | None = ..., inheritable: bool = ...): ...
|
||||
def duplicate(handle: int, target_process: int | None = ..., inheritable: bool = ...) -> int: ...
|
||||
|
||||
def steal_handle(source_pid, handle): ...
|
||||
def send_handle(conn, handle, destination_pid) -> None: ...
|
||||
|
||||
@@ -48,6 +48,9 @@ winsound
|
||||
ossaudiodev
|
||||
spwd
|
||||
|
||||
# multiprocessing.popen_spawn_win32 exists on Darwin but fail to import
|
||||
multiprocessing.popen_spawn_win32
|
||||
|
||||
# Platform differences that cannot be captured by the type system
|
||||
os.SCHED_[A-Z_]+
|
||||
posix.SCHED_[A-Z_]+
|
||||
|
||||
@@ -37,6 +37,9 @@ msvcrt
|
||||
winreg
|
||||
winsound
|
||||
|
||||
# multiprocessing.popen_spawn_win32 exists on Linux but fail to import
|
||||
multiprocessing.popen_spawn_win32
|
||||
|
||||
# Aliases for OSError
|
||||
posix.error.characters_written
|
||||
resource.error.characters_written
|
||||
|
||||
Reference in New Issue
Block a user