Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions stdlib/multiprocessing/popen_spawn_posix.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
from multiprocessing.process import BaseProcess
from typing import ClassVar

from . import popen_fork
from .util import Finalize

if sys.platform != "win32":
__all__ = ["Popen"]

class _DupFd:
fd: int

def __init__(self, fd: int) -> None: ...
def detach(self) -> int: ...

class Popen(popen_fork.Popen):
DupFd: type[_DupFd]
finalizer: Finalize
method: ClassVar[str]
pid: int # may not exist if _launch raises in second try / except
sentinel: int # may not exist if _launch raises in second try / except

def __init__(self, process_obj: BaseProcess) -> None: ...
def duplicate_for_child(self, fd: int) -> int: ...
3 changes: 2 additions & 1 deletion tests/stubtest_allowlists/win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ syslog
termios
xxlimited

# multiprocessing.popen_fork and popen_forkserver exist on Windows but fail to import
# multiprocessing.popen_fork, popen_forkserver, and popen_spawn_posix exist on Windows but fail to import
multiprocessing.popen_fork
multiprocessing.popen_forkserver
multiprocessing.popen_spawn_posix

# Modules that rely on _curses
curses
Expand Down