Skip to content

Commit 1f0e641

Browse files
Kevin Kirschepre-commit-ci[bot]AlexWaygood
authored
Add multiprocessing.popen_forkserver submodule (#8425)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <[email protected]>
1 parent a9f6632 commit 1f0e641

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import sys
2+
from multiprocessing.process import BaseProcess
3+
from typing import ClassVar
4+
5+
from . import popen_fork
6+
from .util import Finalize
7+
8+
if sys.platform != "win32":
9+
__all__ = ["Popen"]
10+
11+
class _DupFd:
12+
def __init__(self, ind: int) -> None: ...
13+
def detach(self) -> int: ...
14+
15+
class Popen(popen_fork.Popen):
16+
DupFd: ClassVar[type[_DupFd]]
17+
finalizer: Finalize
18+
sentinel: int
19+
20+
def __init__(self, process_obj: BaseProcess) -> None: ...
21+
def duplicate_for_child(self, fd: int) -> int: ...
22+
def poll(self, flag: int = ...) -> int | None: ...

tests/stubtest_allowlists/win32.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ syslog
5656
termios
5757
xxlimited
5858

59-
# Multiprocessing.popen_fork exists on Windows but fails to import
59+
# multiprocessing.popen_fork and popen_forkserver exist on Windows but fail to import
6060
multiprocessing.popen_fork
61+
multiprocessing.popen_forkserver
6162

6263
# Modules that rely on _curses
6364
curses

0 commit comments

Comments
 (0)