Backport platform specific code to python2 (#6772)

This commit is contained in:
Nikita Sobolev
2022-01-01 15:26:20 +03:00
committed by GitHub
parent 6bdc158e61
commit 6da5eb2d04
12 changed files with 583 additions and 576 deletions

View File

@@ -1,15 +1,16 @@
import sys
from typing import Callable, Iterable, Tuple
_Reader = Callable[[int], bytes]
if sys.platform != "win32":
_Reader = Callable[[int], bytes]
STDIN_FILENO: int
STDOUT_FILENO: int
STDERR_FILENO: int
STDIN_FILENO: int
STDOUT_FILENO: int
STDERR_FILENO: int
CHILD: int
def openpty() -> Tuple[int, int]: ...
def master_open() -> Tuple[int, str]: ...
def slave_open(tty_name: str) -> int: ...
def fork() -> Tuple[int, int]: ...
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> None: ...
CHILD: int
def openpty() -> Tuple[int, int]: ...
def master_open() -> Tuple[int, str]: ...
def slave_open(tty_name: str) -> int: ...
def fork() -> Tuple[int, int]: ...
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> None: ...