Skip to content

Commit e2c8d58

Browse files
authored
[psutil] Update to 7.1.3 (#15074)
1 parent 8c7256c commit e2c8d58

13 files changed

+251
-57
lines changed

stubs/psutil/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ psutil.__all__
55
psutil._psaix
66
psutil._psbsd
77
psutil._pssunos
8+
psutil._psutil_aix
9+
psutil._psutil_bsd
10+
psutil._psutil_sunos
811

912
# Test utilities
1013
psutil.tests.*

stubs/psutil/@tests/stubtest_allowlist_darwin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
psutil._pslinux
2+
psutil._pswindows
23
psutil._psutil_linux
34
psutil._psutil_windows
4-
psutil._pswindows
55

66
# not always available on ARM64, but we test there
77
psutil.cpu_freq
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
psutil._psosx
2-
psutil._psutil_windows
3-
psutil._psutil_osx
42
psutil._pswindows
3+
psutil._psutil_osx
4+
psutil._psutil_windows
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
psutil._pslinux
21
psutil._psosx
3-
psutil._psutil_linux
2+
psutil._pslinux
43
psutil._psutil_osx
5-
psutil._psutil_posix
4+
psutil._psutil_linux

stubs/psutil/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "7.1.1"
1+
version = "7.1.3"
22
upstream_repository = "https://github.com/giampaolo/psutil"
33

44
[tool.stubtest]

stubs/psutil/psutil/_psbsd.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ INIT_BOOT_TIME: float
111111
def adjust_proc_create_time(ctime: float) -> float: ...
112112
def pids(): ...
113113
def pid_exists(pid): ...
114-
def is_zombie(pid): ...
115114
def wrap_exceptions(fun): ...
116115
def wrap_exceptions_procfs(inst) -> AbstractContextManager[None]: ...
117116

stubs/psutil/psutil/_psosx.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if sys.platform == "darwin":
1818
usage_percent as usage_percent,
1919
)
2020

21-
from . import _common, _psposix, _psutil_osx, _psutil_posix
21+
from . import _common, _psposix, _psutil_osx
2222

2323
_P = ParamSpec("_P")
2424
_R = TypeVar("_R")
@@ -75,7 +75,7 @@ if sys.platform == "darwin":
7575
def sensors_battery() -> _common.sbattery | None: ...
7676

7777
net_io_counters = _psutil_osx.net_io_counters
78-
net_if_addrs = _psutil_posix.net_if_addrs
78+
net_if_addrs = _psutil_osx.net_if_addrs
7979
def net_connections(kind: str = "inet") -> list[_common.sconn]: ...
8080
def net_if_stats() -> dict[str, _common.snicstats]: ...
8181
def boot_time() -> float: ...
@@ -85,7 +85,6 @@ if sys.platform == "darwin":
8585
def pids() -> list[int]: ...
8686
pid_exists = _psposix.pid_exists
8787
def wrap_exceptions(fun: Callable[_P, _R]) -> Callable[_P, _R]: ...
88-
def is_zombie(pid: int) -> bool: ...
8988

9089
class Process:
9190
__slots__ = ["_cache", "_name", "_ppid", "pid"]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
from _typeshed import Incomplete
2+
3+
# TODO: Add POSIX constants and check their aviability (see psutil_posix_add_constants)
4+
AF_LINK: Incomplete
5+
6+
def getpagesize() -> int: ...
7+
def net_if_addrs(): ...
8+
def net_if_flags(nic_name: str, /) -> list[str]: ...
9+
def net_if_is_running(nic_name: str, /) -> bool: ...
10+
def net_if_mtu(nic_name: str, /) -> int: ...
11+
def proc_priority_get(pid: int, /) -> int: ...
12+
def proc_priority_set(pid: int, priority: int, /) -> None: ...
13+
14+
version: Incomplete
15+
SIDL: Incomplete
16+
SZOMB: Incomplete
17+
SACTIVE: Incomplete
18+
SSWAP: Incomplete
19+
SSTOP: Incomplete
20+
TCPS_CLOSED: Incomplete
21+
TCPS_CLOSING: Incomplete
22+
TCPS_CLOSE_WAIT: Incomplete
23+
TCPS_LISTEN: Incomplete
24+
TCPS_ESTABLISHED: Incomplete
25+
TCPS_SYN_SENT: Incomplete
26+
TCPS_SYN_RCVD: Incomplete
27+
TCPS_FIN_WAIT_1: Incomplete
28+
TCPS_FIN_WAIT_2: Incomplete
29+
TCPS_LAST_ACK: Incomplete
30+
TCPS_TIME_WAIT: Incomplete
31+
PSUTIL_CONN_NONE: Incomplete
32+
33+
def proc_args(pid: int, /) -> list[str]: ...
34+
def proc_basic_info(pid: int, procfs_path: str, /): ...
35+
def proc_cpu_times(pid: int, procfs_path: str, /): ...
36+
def proc_cred(pid: int, procfs_path: str, /): ...
37+
def proc_environ(pid: int, /): ...
38+
def proc_name(pid: int, procfs_path: str, /): ...
39+
def proc_threads(pid: int, /): ...
40+
def proc_io_counters(pid: int, /): ...
41+
def proc_num_ctx_switches(requested_pid: int, /): ...
42+
def boot_time(): ...
43+
def disk_io_counters(): ...
44+
def disk_partitions(): ...
45+
def per_cpu_times(): ...
46+
def swap_mem(): ...
47+
def virtual_mem(): ...
48+
def net_io_counters(): ...
49+
def cpu_stats(): ...
50+
def net_connections(requested_pid: int, /): ...
51+
def net_if_stats(nic_name: str, /): ...
52+
def check_pid_range(pid: int, /) -> None: ...
53+
def set_debug(value: bool, /) -> None: ...
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
from _typeshed import Incomplete
2+
3+
# TODO: Add POSIX constants and check their aviability (see psutil_posix_add_constants)
4+
AF_LINK: Incomplete
5+
6+
def getpagesize() -> int: ...
7+
def net_if_addrs(): ...
8+
def net_if_flags(nic_name: str, /) -> list[str]: ...
9+
def net_if_is_running(nic_name: str, /) -> bool: ...
10+
def net_if_mtu(nic_name: str, /) -> int: ...
11+
def proc_priority_get(pid: int, /) -> int: ...
12+
def proc_priority_set(pid: int, priority: int, /) -> None: ...
13+
def net_if_duplex_speed(nic_name: str, /): ...
14+
def proc_is_zombie(pid: int, /) -> bool: ...
15+
16+
SIDL: Incomplete
17+
SRUN: Incomplete
18+
SSLEEP: Incomplete
19+
SSTOP: Incomplete
20+
SZOMB: Incomplete
21+
SWAIT: Incomplete # only FreeBSD
22+
SLOCK: Incomplete # only FreeBSD
23+
SDEAD: Incomplete # only OpenBSD and NetBSD
24+
SONPROC: Incomplete # only OpenBSD and NetBSD
25+
SSUSPENDED: Incomplete # only NetBSD
26+
TCPS_CLOSED: Incomplete
27+
TCPS_CLOSING: Incomplete
28+
TCPS_CLOSE_WAIT: Incomplete
29+
TCPS_LISTEN: Incomplete
30+
TCPS_ESTABLISHED: Incomplete
31+
TCPS_SYN_SENT: Incomplete
32+
TCPS_SYN_RECEIVED: Incomplete
33+
TCPS_FIN_WAIT_1: Incomplete
34+
TCPS_FIN_WAIT_2: Incomplete
35+
TCPS_LAST_ACK: Incomplete
36+
TCPS_TIME_WAIT: Incomplete
37+
PSUTIL_CONN_NONE: Incomplete
38+
39+
def proc_cmdline(*args, **kwargs): ...
40+
def proc_cwd(*args, **kwargs): ...
41+
def proc_environ(*args, **kwargs): ...
42+
def proc_name(*args, **kwargs): ...
43+
def proc_num_fds(*args, **kwargs): ...
44+
def proc_oneshot_info(*args, **kwargs): ...
45+
def proc_open_files(*args, **kwargs): ...
46+
def proc_threads(*args, **kwargs): ...
47+
def proc_num_threads(*args, **kwargs): ... # only FreeBSD and OpenBSD
48+
def proc_cpu_affinity_get(*args, **kwargs): ... # only FreeBSD
49+
def proc_cpu_affinity_set(*args, **kwargs): ... # only FreeBSD
50+
def proc_exe(*args, **kwargs): ... # only FreeBSD
51+
def proc_getrlimit(*args, **kwargs): ... # only FreeBSD
52+
def proc_memory_maps(*args, **kwargs): ... # only FreeBSD
53+
def proc_net_connections(*args, **kwargs): ... # only FreeBSD
54+
def proc_setrlimit(*args, **kwargs): ... # only FreeBSD
55+
def boot_time(*args, **kwargs): ...
56+
def cpu_count_logical(*args, **kwargs): ...
57+
def cpu_stats(*args, **kwargs): ...
58+
def cpu_times(*args, **kwargs): ...
59+
def disk_io_counters(*args, **kwargs): ...
60+
def disk_partitions(*args, **kwargs): ...
61+
def net_connections(*args, **kwargs): ...
62+
def net_io_counters(*args, **kwargs): ...
63+
def per_cpu_times(*args, **kwargs): ...
64+
def pids(*args, **kwargs): ...
65+
def swap_mem(*args, **kwargs): ...
66+
def users(*args, **kwargs): ...
67+
def virtual_mem(*args, **kwargs): ...
68+
def cpu_freq(*args, **kwargs): ... # only FreeBSD and OpenBSD
69+
def cpu_topology(*args, **kwargs): ... # only FreeBSD
70+
def sensors_battery(*args, **kwargs): ... # only FreeBSD
71+
def sensors_cpu_temperature(*args, **kwargs): ... # only FreeBSD
72+
def check_pid_range(*args, **kwargs): ...
73+
def set_debug(*args, **kwargs): ...
Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
1+
from _typeshed import Incomplete
2+
from typing import Final
3+
4+
# TODO: Add POSIX constants and check their aviability (see psutil_posix_add_constants)
5+
RLIM_INFINITY: Final[int]
6+
RLIMIT_AS: Final[int]
7+
RLIMIT_CORE: Final[int]
8+
RLIMIT_CPU: Final[int]
9+
RLIMIT_DATA: Final[int]
10+
RLIMIT_FSIZE: Final[int]
11+
RLIMIT_LOCKS: Final[int]
12+
RLIMIT_MEMLOCK: Final[int]
13+
RLIMIT_MSGQUEUE: Final[int]
14+
RLIMIT_NICE: Final[int]
15+
RLIMIT_NOFILE: Final[int]
16+
RLIMIT_NPROC: Final[int]
17+
RLIMIT_RSS: Final[int]
18+
RLIMIT_RTPRIO: Final[int]
19+
RLIMIT_RTTIME: Final[int]
20+
RLIMIT_SIGPENDING: Final[int]
21+
RLIMIT_STACK: Final[int]
22+
23+
def getpagesize() -> int: ...
24+
def net_if_addrs(): ...
25+
def net_if_flags(nic_name: str, /) -> list[str]: ...
26+
def net_if_is_running(nic_name: str, /) -> bool: ...
27+
def net_if_mtu(nic_name: str, /) -> int: ...
28+
def proc_priority_get(pid: int, /) -> int: ...
29+
def proc_priority_set(pid: int, priority: int, /) -> None: ...
30+
def users() -> list[tuple[Incomplete, ...]]: ...
31+
32+
version: int
133
DUPLEX_FULL: int
234
DUPLEX_HALF: int
335
DUPLEX_UNKNOWN: int
4-
version: int
536

6-
def check_pid_range(pid: int, /) -> None: ...
7-
def disk_partitions(*args, **kwargs): ...
8-
def linux_sysinfo(*args, **kwargs): ...
9-
def net_if_duplex_speed(*args, **kwargs): ...
10-
def proc_cpu_affinity_get(*args, **kwargs): ...
11-
def proc_cpu_affinity_set(*args, **kwargs): ...
12-
def proc_ioprio_get(*args, **kwargs): ...
37+
def proc_ioprio_get(pid: int, /): ...
1338
def proc_ioprio_set(*args, **kwargs): ...
14-
def set_debug(*args, **kwargs): ...
39+
def proc_cpu_affinity_get(pid: int, /): ...
40+
def proc_cpu_affinity_set(*args, **kwargs): ...
41+
def disk_partitions(mtab_path: str, /): ...
42+
def net_if_duplex_speed(nic_name: str, /): ...
43+
def linux_sysinfo() -> tuple[int, int, int, int, int, int, int]: ...
44+
def check_pid_range(pid: int, /) -> None: ...
45+
def set_debug(value: bool, /) -> None: ...

0 commit comments

Comments
 (0)