8000 os.popen: add encoding argument for 3.11 by JelleZijlstra · Pull Request #7796 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

os.popen: add encoding argument for 3.11 #7796

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Next Next commit
os.popen: add encoding argument for 3.11
  • Loading branch information
JelleZijlstra authored May 7, 2022
commit 8a93fa7631d113512345708b6dff88223c7726b2
5 changes: 4 additions & 1 deletion stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,10 @@ class _wrap_close(_TextIOWrapper):
def __init__(self, stream: _TextIOWrapper, proc: Popen[str]) -> None: ...
def close(self) -> int | None: ... # type: ignore[override]

def popen(cmd: str, mode: str = ..., buffering: int = ...) -> _wrap_close: ...
if sys.version_info >= (3, 11):
def popen(cmd: str, mode: str = ..., buffering: int = ..., encoding: str | None = ...) -> _wrap_close: ...
else:
def popen(cmd: str, mode: str = ..., buffering: int = ...) -> _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

Expand Down
0