diff --git a/stubs/psutil/@tests/stubtest_allowlist_darwin.txt b/stubs/psutil/@tests/stubtest_allowlist_darwin.txt index 4cf5ba5d3a88..d90126c03a35 100644 --- a/stubs/psutil/@tests/stubtest_allowlist_darwin.txt +++ b/stubs/psutil/@tests/stubtest_allowlist_darwin.txt @@ -2,3 +2,7 @@ psutil._pslinux psutil._psutil_linux psutil._psutil_windows psutil._pswindows + +# not always available on ARM64, but we test there +psutil.cpu_freq +psutil._psosx.cpu_freq diff --git a/stubs/psutil/METADATA.toml b/stubs/psutil/METADATA.toml index 85e2bcc2e4e8..35f15a689034 100644 --- a/stubs/psutil/METADATA.toml +++ b/stubs/psutil/METADATA.toml @@ -1,4 +1,4 @@ -version = "7.0.*" +version = "7.1.1" upstream_repository = "https://github.com/giampaolo/psutil" [tool.stubtest] diff --git a/stubs/psutil/psutil/_pslinux.pyi b/stubs/psutil/psutil/_pslinux.pyi index a3161969f1cd..edd4445e8c31 100644 --- a/stubs/psutil/psutil/_pslinux.pyi +++ b/stubs/psutil/psutil/_pslinux.pyi @@ -24,8 +24,8 @@ HAS_PROC_IO_PRIORITY: Incomplete HAS_CPU_AFFINITY: Incomplete CLOCK_TICKS: Incomplete PAGESIZE: Incomplete -BOOT_TIME: Incomplete LITTLE_ENDIAN: Incomplete +UNSET: object DISK_SECTOR_SIZE: int AF_LINK: Incomplete AddressFamily: Incomplete @@ -213,7 +213,7 @@ class Process: def cpu_times(self): ... def cpu_num(self): ... def wait(self, timeout: Incomplete | None = ...): ... - def create_time(self): ... + def create_time(self, monotonic: bool = False): ... def memory_info(self): ... def memory_full_info(self): ... def memory_maps(self): ... diff --git a/stubs/psutil/psutil/_psosx.pyi b/stubs/psutil/psutil/_psosx.pyi index 59793069531b..63679f0e06d4 100644 --- a/stubs/psutil/psutil/_psosx.pyi +++ b/stubs/psutil/psutil/_psosx.pyi @@ -70,23 +70,21 @@ if sys.platform == "darwin": disk_usage = _psposix.disk_usage disk_io_counters = _psutil_osx.disk_io_counters - def disk_partitions(all: bool = False) -> list[_common.sdiskpart]: ... def sensors_battery() -> _common.sbattery | None: ... net_io_counters = _psutil_osx.net_io_counters net_if_addrs = _psutil_posix.net_if_addrs - def net_connections(kind: str = "inet") -> list[_common.sconn]: ... def net_if_stats() -> dict[str, _common.snicstats]: ... def boot_time() -> float: ... + INIT_BOOT_TIME: float + def adjust_proc_create_time(ctime: float) -> float: ... def users() -> list[_common.suser]: ... def pids() -> list[int]: ... - pid_exists = _psposix.pid_exists - - def is_zombie(pid: int) -> bool: ... def wrap_exceptions(fun: Callable[_P, _R]) -> Callable[_P, _R]: ... + def is_zombie(pid: int) -> bool: ... class Process: __slots__ = ["_cache", "_name", "_ppid", "pid"] @@ -106,7 +104,7 @@ if sys.platform == "darwin": def memory_info(self) -> pmem: ... def memory_full_info(self) -> pfullmem: ... def cpu_times(self) -> _common.pcputimes: ... - def create_time(self) -> float: ... + def create_time(self, monotonic: bool = False) -> float: ... def num_ctx_switches(self) -> _common.pctxsw: ... def num_threads(self) -> int: ... def open_files(self) -> list[_common.popenfile]: ... diff --git a/stubs/psutil/psutil/_psutil_linux.pyi b/stubs/psutil/psutil/_psutil_linux.pyi index 8b91a0c6d3df..41f661385762 100644 --- a/stubs/psutil/psutil/_psutil_linux.pyi +++ b/stubs/psutil/psutil/_psutil_linux.pyi @@ -12,4 +12,3 @@ def proc_cpu_affinity_set(*args, **kwargs): ... def proc_ioprio_get(*args, **kwargs): ... def proc_ioprio_set(*args, **kwargs): ... def set_debug(*args, **kwargs): ... -def users(*args, **kwargs): ... diff --git a/stubs/psutil/psutil/_psutil_osx.pyi b/stubs/psutil/psutil/_psutil_osx.pyi index b14656b97130..6d4d04ca47ca 100644 --- a/stubs/psutil/psutil/_psutil_osx.pyi +++ b/stubs/psutil/psutil/_psutil_osx.pyi @@ -53,12 +53,12 @@ if sys.platform == "darwin": def disk_io_counters() -> dict[str, tuple[int, int, int, int, int, int]]: ... def disk_partitions() -> list[tuple[str, str, str, str]]: ... def disk_usage_used(mount_point: StrOrBytesPath, default: _T, /) -> int | _T: ... + def has_cpu_freq(*args, **kwargs) -> bool: ... def net_io_counters() -> dict[str, tuple[int, int, int, int, int, int, int, int]]: ... def per_cpu_times() -> list[tuple[float, float, float, float]]: ... def pids() -> list[int]: ... def sensors_battery() -> tuple[int, int, int]: ... def swap_mem() -> tuple[int, int, int, int, int]: ... - def users() -> list[tuple[str, str, str, float, int]]: ... def virtual_mem() -> tuple[int, int, int, int, int, int]: ... def check_pid_range(pid: int, /) -> None: ... def set_debug(value: bool, /) -> None: ... diff --git a/stubs/psutil/psutil/_psutil_posix.pyi b/stubs/psutil/psutil/_psutil_posix.pyi index 4ae2d853e2d8..6f5f3b5dfcc6 100644 --- a/stubs/psutil/psutil/_psutil_posix.pyi +++ b/stubs/psutil/psutil/_psutil_posix.pyi @@ -31,4 +31,5 @@ if sys.platform == "darwin": AF_LINK: Final[int] def net_if_duplex_speed(nic_name: str, /) -> list[int]: ... +def users(*args, **kwargs): ... def setpriority(pid: int, priority: int, /) -> None: ... diff --git a/stubs/psutil/psutil/_psutil_windows.pyi b/stubs/psutil/psutil/_psutil_windows.pyi index 3c84c160c047..74c6b1b5845f 100644 --- a/stubs/psutil/psutil/_psutil_windows.pyi +++ b/stubs/psutil/psutil/_psutil_windows.pyi @@ -66,7 +66,7 @@ if sys.platform == "win32": def proc_info( pid: int, / ) -> tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int]: ... - def boot_time() -> float: ... + def uptime() -> float: ... def cpu_count_cores() -> int | None: ... def cpu_count_logical() -> int | None: ... def cpu_freq() -> tuple[int, int]: ...