From 7a48825938ebafbe808861782651706f7269e7ca Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Fri, 9 Sep 2016 12:00:00 -0700 Subject: [PATCH] Copy stubs for os.spawn* from Python 3 to Python 2 (#528) The stubs for the os module in Python 2.7 were somehow missing the spawn* functions that were added to Python 3. --- stdlib/2.7/os/__init__.pyi | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/stdlib/2.7/os/__init__.pyi b/stdlib/2.7/os/__init__.pyi index 4d8e01407..40f5ed0a2 100644 --- a/stdlib/2.7/os/__init__.pyi +++ b/stdlib/2.7/os/__init__.pyi @@ -197,8 +197,22 @@ def kill(pid: int, sig: int) -> None: ... def killpg(pgid: int, sig: int) -> None: ... def nice(increment: int) -> int: ... -# TODO: plock, popen*, spawn*, P_* +# TODO: plock, popen*, P_* +def spawnl(mode: int, path: AnyStr, arg0: AnyStr, *args: AnyStr) -> int: ... +def spawnle(mode: int, path: AnyStr, arg0: AnyStr, + *args: Any) -> int: ... # Imprecise sig +def spawnlp(mode: int, file: AnyStr, arg0: AnyStr, + *args: AnyStr) -> int: ... # Unix only TODO +def spawnlpe(mode: int, file: AnyStr, arg0: AnyStr, *args: Any) -> int: + ... # Imprecise signature; Unix only TODO +def spawnv(mode: int, path: AnyStr, args: List[AnyStr]) -> int: ... +def spawnve(mode: int, path: AnyStr, args: List[AnyStr], + env: Mapping[str, str]) -> int: ... +def spawnvp(mode: int, file: AnyStr, args: List[AnyStr]) -> int: ... # Unix only +def spawnvpe(mode: int, file: AnyStr, args: List[AnyStr], + env: Mapping[str, str]) -> int: + ... # Unix only def startfile(path: unicode, operation: str = ...) -> None: ... # Windows only def system(command: unicode) -> int: ... def times() -> Tuple[float, float, float, float, float]: ...