mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add pty deprecations (#12493)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Final
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import TypeAlias, deprecated
|
||||
|
||||
if sys.platform != "win32":
|
||||
__all__ = ["openpty", "fork", "spawn"]
|
||||
@@ -13,7 +13,12 @@ if sys.platform != "win32":
|
||||
|
||||
CHILD: Final = 0
|
||||
def openpty() -> tuple[int, int]: ...
|
||||
def master_open() -> tuple[int, str]: ... # deprecated, use openpty()
|
||||
def slave_open(tty_name: str) -> int: ... # deprecated, use openpty()
|
||||
|
||||
if sys.version_info < (3, 14):
|
||||
@deprecated("Deprecated in 3.12, to be removed in 3.14; use openpty() instead")
|
||||
def master_open() -> tuple[int, str]: ...
|
||||
@deprecated("Deprecated in 3.12, to be removed in 3.14; use openpty() instead")
|
||||
def slave_open(tty_name: str) -> int: ...
|
||||
|
||||
def fork() -> tuple[int, int]: ...
|
||||
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user