Skip to content

add os.login_tty for 3.11 #7800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ def fstat(fd: int) -> stat_result: ...
def ftruncate(__fd: int, __length: int) -> None: ...
def fsync(fd: FileDescriptorLike) -> None: ...
def isatty(__fd: int) -> bool: ...

if sys.platform != "win32" and sys.version_info >= (3, 11):
def login_tty(__fd: int) -> None: ...

def lseek(__fd: int, __position: int, __how: int) -> int: ...
def open(path: StrOrBytesPath, flags: int, mode: int = ..., *, dir_fd: int | None = ...) -> int: ...
def pipe() -> tuple[int, int]: ...
Expand Down
3 changes: 3 additions & 0 deletions stdlib/posix.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ if sys.platform != "win32":
if sys.version_info >= (3, 10):
from os import RWF_APPEND as RWF_APPEND

if sys.version_info >= (3, 11):
from os import login_tty as login_tty

if sys.version_info >= (3, 9):
from os import CLD_KILLED as CLD_KILLED, CLD_STOPPED as CLD_STOPPED, waitstatus_to_exitcode as waitstatus_to_exitcode

Expand Down