[os] Add 3.14 os module deprecations (#15179)

This commit is contained in:
Max Muoto
2025-12-27 04:21:57 -06:00
committed by GitHub
parent ab122801d4
commit bc7fba07bc
+55 -14
View File
@@ -1395,19 +1395,48 @@ class _wrap_close:
def write(self, s: str, /) -> int: ...
def writelines(self, lines: Iterable[str], /) -> None: ...
def popen(cmd: str, mode: str = "r", buffering: int = -1) -> _wrap_close: ...
def spawnl(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
def spawnle(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise sig
if sys.platform != "win32":
def spawnv(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
def spawnve(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
if sys.version_info >= (3, 14):
@deprecated("Soft deprecated. Use the subprocess module instead.")
def popen(cmd: str, mode: str = "r", buffering: int = -1) -> _wrap_close: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnl(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnle(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise sig
else:
def spawnv(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, /) -> int: ...
def spawnve(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, env: _ExecEnv, /) -> int: ...
def popen(cmd: str, mode: str = "r", buffering: int = -1) -> _wrap_close: ...
def spawnl(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
def spawnle(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise sig
if sys.platform != "win32":
if sys.version_info >= (3, 14):
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnv(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnve(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
else:
def spawnv(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
def spawnve(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
else:
if sys.version_info >= (3, 14):
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnv(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, /) -> int: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnve(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, env: _ExecEnv, /) -> int: ...
else:
def spawnv(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, /) -> int: ...
def spawnve(mode: int, path: StrOrBytesPath, argv: _ExecVArgs, env: _ExecEnv, /) -> int: ...
if sys.version_info >= (3, 14):
@deprecated("Soft deprecated. Use the subprocess module instead.")
def system(command: StrOrBytesPath) -> int: ...
else:
def system(command: StrOrBytesPath) -> int: ...
def system(command: StrOrBytesPath) -> int: ...
@final
class times_result(structseq[float], tuple[float, float, float, float, float]):
if sys.version_info >= (3, 10):
@@ -1440,10 +1469,22 @@ if sys.platform == "win32":
def startfile(filepath: StrOrBytesPath, operation: str = ...) -> None: ...
else:
def spawnlp(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
def spawnlpe(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise signature
def spawnvp(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
def spawnvpe(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
if sys.version_info >= (3, 14):
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnlp(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnlpe(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise signature
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnvp(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
@deprecated("Soft deprecated. Use the subprocess module instead.")
def spawnvpe(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
else:
def spawnlp(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ...
def spawnlpe(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise signature
def spawnvp(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
def spawnvpe(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
def wait() -> tuple[int, int]: ... # Unix only
# Added to MacOS in 3.13
if sys.platform != "darwin" or sys.version_info >= (3, 13):