8000 Makes `psutil.Popen` an alias of `subprocess.Popen` by sobolevn · Pull Request #6078 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Makes psutil.Popen an alias of subprocess.Popen #6078

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 1 commit into from
Closed
Changes from all commits
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
Makes psutil.Popen an alias of subprocess.Popen
Refs #6074
  • Loading branch information
sobolevn authored Sep 26, 2021
commit 3bb29e21d3fecb0c2f7c51e3ea95474cd090edd9
11 changes: 3 additions & 8 deletions stubs/psutil/psutil/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import subprocess
import sys
from typing import Any, Callable, ContextManager, Iterable, Iterator, TypeVar
from typing import Any, Callable, ContextManager, Iterable, Iterator

from ._common import (
AIX as AIX,
Expand Down Expand Up @@ -160,13 +161,7 @@ class Process:
def kill(self) -> None: ...
def wait(self, timeout: int | None = ...) -> int: ...

_Popen = TypeVar("_Popen", bound="Popen")

class Popen(Process):
def __init__(self, *args, **kwargs) -> None: ...
def __enter__(self: _Popen) -> _Popen: ...
def __exit__(self, *args, **kwargs) -> None: ...
def __getattribute__(self, name: str) -> Any: ...
Popen = subprocess.Popen # type alias

def pids() -> list[int]: ...
def pid_exists(pid: int) -> bool: ...
Expand Down
0