diff --git a/stdlib/2/os/__init__.pyi b/stdlib/2/os/__init__.pyi index 8f7147167..4f7575d0d 100644 --- a/stdlib/2/os/__init__.pyi +++ b/stdlib/2/os/__init__.pyi @@ -192,19 +192,19 @@ def statvfs(path: _PathType) -> _StatVFS: ... def symlink(source: _PathType, link_name: _PathType) -> None: ... def unlink(path: _PathType) -> None: ... def utime(path: _PathType, times: Optional[Tuple[int, int]]) -> None: ... -def walk(top: _PathType, topdown: bool = ..., onerror: Any = ..., - followlinks: bool = ...) -> Iterator[Tuple[_PathType, List[_PathType], - List[_PathType]]]: ... +def walk(top: AnyStr, topdown: bool = ..., onerror: Any = ..., + followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], + List[Anystr]]]: ... def abort() -> None: ... def execl(file: _PathType, *args) -> None: ... def execle(file: _PathType, *args) -> None: ... def execlp(file: _PathType, *args) -> None: ... def execlpe(file: _PathType, *args) -> None: ... -def execv(path: _PathType, args: Union[Tuple[_PathType], List[_PathType]]) -> None: ... -def execve(path: _PathType, args: Union[Tuple[_PathType], List[_PathType]], env: Mapping[_PathType, _PathType]) -> None: ... -def execvp(file: _PathType, args: Union[Tuple[_PathType], List[_PathType]]) -> None: ... -def execvpe(file: _PathType, args: Union[Tuple[_PathType], List[_PathType]], env: Mapping[_PathType, _PathType]) -> None: ... +def execv(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ... +def execve(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ... +def execvp(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ... +def execvpe(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ... def _exit(n: int) -> NoReturn: ... def fork() -> int: ... def forkpty() -> Tuple[int, int]: ... @@ -224,11 +224,11 @@ def spawnlp(mode: int, file: _PathType, arg0: _PathType, *args: _PathType) -> int: ... # Unix only TODO def spawnlpe(mode: int, file: _PathType, arg0: _PathType, *args: Any) -> int: ... # Imprecise signature; Unix only TODO -def spawnv(mode: int, path: _PathType, args: List[_PathType]) -> int: ... -def spawnve(mode: int, path: _PathType, args: List[_PathType], +def spawnv(mode: int, path: _PathType, args: List[Union[bytes, Text]]) -> int: ... +def spawnve(mode: int, path: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... -def spawnvp(mode: int, file: _PathType, args: List[_PathType]) -> int: ... # Unix only -def spawnvpe(mode: int, file: _PathType, args: List[_PathType], +def spawnvp(mode: int, file: _PathType, args: List[Union[bytes, Text]]) -> int: ... # Unix only +def spawnvpe(mode: int, file: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... # Unix only def startfile(path: _PathType, operation: Optional[str] = ...) -> None: ... # Windows only diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index 8e942a364..ad537c9a3 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -306,22 +306,21 @@ def unlink(path: _PathType) -> None: ... def utime(path: _PathType, times: Union[Tuple[int, int], Tuple[float, float]] = ...) -> None: ... # TODO onerror: function from OSError to void -def walk(top: _PathType, topdown: bool = ..., onerror: Any = ..., - followlinks: bool = ...) -> Iterator[Tuple[_PathType, List[_PathType], - List[_PathType]]]: ... +def walk(top: AnyStr, topdown: bool = ..., onerror: Any = ..., + followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], + List[AnyStr]]]: ... def abort() -> 'None': ... -def execl(path: _PathType, arg0: _PathType, *args: _PathType) -> None: ... -def execle(path: _PathType, arg0: _PathType, +def execl(path: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> None: ... +def execle(path: _PathType, arg0: Union[bytes, Text], *args: Any) -> None: ... # Imprecise signature -def execlp(path: _PathType, arg0: _PathType, *args: _PathType) -> None: ... -def execlpe(path: _PathType, arg0: _PathType, +def execlp(path: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> None: ... +def execlpe(path: _PathType, arg0: Union[bytes, Text], *args: Any) -> None: ... # Imprecise signature -def execv(path: _PathType, args: Union[Tuple[_PathType], List[_PathType]]) -> None: ... -def execve(path: _PathType, args: Union[Tuple[_PathType], List[_PathType]], env: Mapping[_PathType, _PathType]) -> None: ... -def execvp(file: _PathType, args: Union[Tuple[_PathType], List[_PathType]]) -> None: ... -def execvpe(file: _PathType, args: Union[Tuple[_PathType], List[_PathType]], - env: Mapping[str, str]) -> None: ... +def execv(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ... +def execve(path: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ... +def execvp(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]]) -> None: ... +def execvpe(file: _PathType, args: Union[Tuple[Union[bytes, Text]], List[Union[bytes, Text]]], env: Mapping[str, str]) -> None: ... def _exit(n: int) -> NoReturn: ... def fork() -> int: ... # Unix only def forkpty() -> Tuple[int, int]: ... # some flavors of Unix @@ -343,11 +342,11 @@ def spawnlp(mode: int, file: _PathType, arg0: _PathType, *args: _PathType) -> int: ... # Unix only TODO def spawnlpe(mode: int, file: _PathType, arg0: _PathType, *args: Any) -> int: ... # Imprecise signature; Unix only TODO -def spawnv(mode: int, path: _PathType, args: List[_PathType]) -> int: ... -def spawnve(mode: int, path: _PathType, args: List[_PathType], +def spawnv(mode: int, path: _PathType, args: List[Union[bytes, Text]]) -> int: ... +def spawnve(mode: int, path: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... -def spawnvp(mode: int, file: _PathType, args: List[_PathType]) -> int: ... # Unix only -def spawnvpe(mode: int, file: _PathType, args: List[_PathType], +def spawnvp(mode: int, file: _PathType, args: List[Union[bytes, Text]]) -> int: ... # Unix only +def spawnvpe(mode: int, file: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... # Unix only def startfile(path: _PathType, operation: Optional[str] = ...) -> None: ... # Windows only