diff --git a/stdlib/2/os/__init__.pyi b/stdlib/2/os/__init__.pyi index 17b1162da..2309ae04e 100644 --- a/stdlib/2/os/__init__.pyi +++ b/stdlib/2/os/__init__.pyi @@ -62,9 +62,9 @@ class _Environ(MutableMapping[str, str]): def copy(self) -> Dict[str, str]: ... environ = ... # type: _Environ -confstr_names = ... # type: Mapping[str, int] -pathconf_names = ... # type: Mapping[str, int] -sysconf_names = ... # type: Mapping[str, int] +confstr_names = ... # type: Mapping[str, int] # Unix only +pathconf_names = ... # type: Mapping[str, int] # Unix only +sysconf_names = ... # type: Mapping[str, int] # Unix only EX_OK = 0 # Unix only EX_USAGE = 0 # Unix only EX_DATAERR = 0 # Unix only @@ -92,91 +92,91 @@ WNOHANG = 0 # Unix only WCONTINUED = 0 # some Unix systems WUNTRACED = 0 # Unix only -TMP_MAX = 0 +TMP_MAX = 0 # Undocumented, but used by tempfile _PathType = Union[bytes, Text] _StatVFS = NamedTuple('_StatVFS', [('f_bsize', int), ('f_frsize', int), ('f_blocks', int), ('f_bfree', int), ('f_bavail', int), ('f_files', int), ('f_ffree', int), ('f_favail', int), ('f_flag', int), ('f_namemax', int)]) -def ctermid() -> str: ... -def getegid() -> int: ... -def geteuid() -> int: ... -def getgid() -> int: ... -def getgroups() -> List[int]: ... -def initgroups(username: str, gid: int) -> None: ... +def ctermid() -> str: ... # Unix only +def getegid() -> int: ... # Unix only +def geteuid() -> int: ... # Unix only +def getgid() -> int: ... # Unix only +def getgroups() -> List[int]: ... # Unix only, behaves differently on Mac +def initgroups(username: str, gid: int) -> None: ... # Unix only def getlogin() -> str: ... -def getpgid(pid: int) -> int: ... -def getpgrp() -> int: ... +def getpgid(pid: int) -> int: ... # Unix only +def getpgrp() -> int: ... # Unix only def getpid() -> int: ... def getppid() -> int: ... -def getresuid() -> Tuple[int, int, int]: ... -def getresgid() -> Tuple[int, int, int]: ... -def getuid() -> int: ... +def getresuid() -> Tuple[int, int, int]: ... # Unix only +def getresgid() -> Tuple[int, int, int]: ... # Unix only +def getuid() -> int: ... # Unix only def getenv(varname: unicode, value: unicode = ...) -> str: ... def putenv(varname: unicode, value: unicode) -> None: ... -def setegid(egid: int) -> None: ... -def seteuid(euid: int) -> None: ... -def setgid(gid: int) -> None: ... -def setgroups(groups: Sequence[int]) -> None: ... -def setpgrp(*args) -> None: ... -def setpgid(pid: int, pgrp: int) -> None: ... -def setregid(rgid: int, egid: int) -> None: ... -def setresgid(rgid: int, egid: int, sgid: int) -> None: ... -def setresuid(ruid: int, euid: int, suid: int) -> None: ... -def setreuid(ruid: int, euid: int) -> None: ... -def getsid(pid: int) -> int: ... -def setsid() -> None: ... -def setuid(pid: int) -> None: ... +def setegid(egid: int) -> None: ... # Unix only +def seteuid(euid: int) -> None: ... # Unix only +def setgid(gid: int) -> None: ... # Unix only +def setgroups(groups: Sequence[int]) -> None: ... # Unix only +def setpgrp(*args) -> None: ... # Unix only +def setpgid(pid: int, pgrp: int) -> None: ... # Unix only +def setregid(rgid: int, egid: int) -> None: ... # Unix only +def setresgid(rgid: int, egid: int, sgid: int) -> None: ... # Unix only +def setresuid(ruid: int, euid: int, suid: int) -> None: ... # Unix only +def setreuid(ruid: int, euid: int) -> None: ... # Unix only +def getsid(pid: int) -> int: ... # Unix only +def setsid() -> None: ... # Unix only +def setuid(pid: int) -> None: ... # Unix only def strerror(code: int) -> str: ... def umask(mask: int) -> int: ... -def uname() -> Tuple[str, str, str, str, str]: ... +def uname() -> Tuple[str, str, str, str, str]: ... # Unix only def unsetenv(varname: str) -> None: ... def fdopen(fd: int, *args, **kwargs) -> IO[Any]: ... def close(fd: int) -> None: ... def closerange(fd_low: int, fd_high: int) -> None: ... def dup(fd: int) -> int: ... def dup2(fd: int, fd2: int) -> None: ... -def fchmod(fd: int, mode: int) -> None: ... -def fchown(fd: int, uid: int, gid: int) -> None: ... -def fdatasync(fd: int) -> None: ... +def fchmod(fd: int, mode: int) -> None: ... # Unix only +def fchown(fd: int, uid: int, gid: int) -> None: ... # Unix only +def fdatasync(fd: int) -> None: ... # Unix only, not Mac +def fpathconf(fd: int, name: str) -> None: ... # Unix only def fstat(fd: int) -> Any: ... -def fstatvfs(fd: int) -> _StatVFS: ... +def fstatvfs(fd: int) -> _StatVFS: ... # Unix only def fsync(fd: int) -> None: ... -def ftruncate(fd: int, length: int) -> None: ... -def isatty(fd: int) -> bool: ... +def ftruncate(fd: int, length: int) -> None: ... # Unix only +def isatty(fd: int) -> bool: ... # Unix only def lseek(fd: int, pos: int, how: int) -> None: ... def open(file: _PathType, flags: int, mode: int = ...) -> int: ... -def openpty() -> Tuple[int, int]: ... +def openpty() -> Tuple[int, int]: ... # some flavors of Unix def pipe() -> Tuple[int, int]: ... def read(fd: int, n: int) -> str: ... -def tcgetpgrp(fd: int) -> int: ... -def tcsetpgrp(fd: int, pg: int) -> None: ... -def ttyname(fd: int) -> str: ... +def tcgetpgrp(fd: int) -> int: ... # Unix only +def tcsetpgrp(fd: int, pg: int) -> None: ... # Unix only +def ttyname(fd: int) -> str: ... # Unix only def write(fd: int, str: str) -> int: ... def access(path: _PathType, mode: int) -> bool: ... -def fpathconf(fd: int, name: str) -> None: ... def chdir(path: _PathType) -> None: ... def fchdir(fd: int) -> None: ... def getcwd() -> str: ... def getcwdu() -> unicode: ... -def chflags(path: _PathType, flags: int) -> None: ... -def chroot(path: _PathType) -> None: ... +def chflags(path: _PathType, flags: int) -> None: ... # Unix only +def chroot(path: _PathType) -> None: ... # Unix only def chmod(path: _PathType, mode: int) -> None: ... -def chown(path: _PathType, uid: int, gid: int) -> None: ... -def lchflags(path: _PathType, flags: int) -> None: ... -def lchmod(path: _PathType, uid: int, gid: int) -> None: ... -def lchown(path: _PathType, uid: int, gid: int) -> None: ... +def chown(path: _PathType, uid: int, gid: int) -> None: ... # Unix only +def lchflags(path: _PathType, flags: int) -> None: ... # Unix only +def lchmod(path: _PathType, uid: int, gid: int) -> None: ... # Unix only +def lchown(path: _PathType, uid: int, gid: int) -> None: ... # Unix only def link(source: _PathType, link_name: _PathType) -> None: ... def listdir(path: AnyStr) -> List[AnyStr]: ... def lstat(path: _PathType) -> Any: ... -def mkfifo(path: _PathType, mode: int = ...) -> None: ... +def mkfifo(path: _PathType, mode: int = ...) -> None: ... # Unix only def mknod(filename: _PathType, mode: int = ..., device: int = ...) -> None: ... def major(device: int) -> int: ... def minor(device: int) -> int: ... def makedev(major: int, minor: int) -> int: ... def mkdir(path: _PathType, mode: int = ...) -> None: ... def makedirs(path: _PathType, mode: int = ...) -> None: ... -def pathconf(path: _PathType, name: str) -> str: ... +def pathconf(path: _PathType, name: str) -> str: ... # Unix only def readlink(path: AnyStr) -> AnyStr: ... def remove(path: _PathType) -> None: ... def removedirs(path: _PathType) -> None: ... @@ -188,7 +188,7 @@ def stat(path: _PathType) -> Any: ... def stat_float_times(newvalue: bool = ...) -> None: ... @overload def stat_float_times() -> bool: ... -def statvfs(path: _PathType) -> _StatVFS: ... +def statvfs(path: _PathType) -> _StatVFS: ... # Unix only def symlink(source: _PathType, link_name: _PathType) -> None: ... def unlink(path: _PathType) -> None: ... def utime(path: _PathType, times: Optional[Tuple[int, int]]) -> None: ... @@ -211,11 +211,11 @@ def execvp(file: _PathType, args: _ExecVArgs) -> None: ... def execvpe(file: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> None: ... def _exit(n: int) -> NoReturn: ... -def fork() -> int: ... -def forkpty() -> Tuple[int, int]: ... +def fork() -> int: ... # Unix only +def forkpty() -> Tuple[int, int]: ... # some flavors of Unix def kill(pid: int, sig: int) -> None: ... -def killpg(pgid: int, sig: int) -> None: ... -def nice(increment: int) -> int: ... +def killpg(pgid: int, sig: int) -> None: ... # Unix only +def nice(increment: int) -> int: ... # Unix only # TODO: plock, popen*, P_* def popen(command: str, *args, **kwargs) -> Optional[IO[Any]]: ... def popen2(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any]]: ... @@ -243,17 +243,17 @@ def wait() -> Tuple[int, int]: ... # Unix only def waitpid(pid: int, options: int) -> Tuple[int, int]: ... def wait3(options: int) -> Tuple[int, int, Any]: ... # Unix only def wait4(pid: int, options: int) -> Tuple[int, int, Any]: ... # Unix only -def WCOREDUMP(status: int) -> bool: ... -def WIFCONTINUED(status: int) -> bool: ... -def WIFSTOPPED(status: int) -> bool: ... -def WIFSIGNALED(status: int) -> bool: ... -def WIFEXITED(status: int) -> bool: ... -def WEXITSTATUS(status: int) -> int: ... -def WSTOPSIG(status: int) -> int: ... -def WTERMSIG(status: int) -> int: ... -def confstr(name: Union[str, int]) -> Optional[str]: ... -def getloadavg() -> Tuple[float, float, float]: ... -def sysconf(name: Union[str, int]) -> int: ... +def WCOREDUMP(status: int) -> bool: ... # Unix only +def WIFCONTINUED(status: int) -> bool: ... # Unix only +def WIFSTOPPED(status: int) -> bool: ... # Unix only +def WIFSIGNALED(status: int) -> bool: ... # Unix only +def WIFEXITED(status: int) -> bool: ... # Unix only +def WEXITSTATUS(status: int) -> int: ... # Unix only +def WSTOPSIG(status: int) -> int: ... # Unix only +def WTERMSIG(status: int) -> int: ... # Unix only +def confstr(name: Union[str, int]) -> Optional[str]: ... # Unix only +def getloadavg() -> Tuple[float, float, float]: ... # Unix only +def sysconf(name: Union[str, int]) -> int: ... # Unix only def urandom(n: int) -> str: ... def tmpfile() -> IO[Any]: ... diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index 9c1bcaf5b..e6939d7b4 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -389,8 +389,7 @@ def times() -> Tuple[float, float, float, float, float]: ... def wait() -> Tuple[int, int]: ... # Unix only def waitpid(pid: int, options: int) -> Tuple[int, int]: ... def wait3(options: Union[int, None] = ...) -> Tuple[int, int, Any]: ... # Unix only -def wait4(pid: int, options: int) -> Tuple[int, int, Any]: - ... # Unix only +def wait4(pid: int, options: int) -> Tuple[int, int, Any]: ... # Unix only def WCOREDUMP(status: int) -> bool: ... # Unix only def WIFCONTINUED(status: int) -> bool: ... # Unix only def WIFSTOPPED(status: int) -> bool: ... # Unix only