Skip to content

Commit 052551b

Browse files
committed
fix osx
1 parent 1284318 commit 052551b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

stubs/psutil/@tests/stubtest_allowlist_darwin.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ psutil._pslinux
22
psutil._psutil_linux
33
psutil._psutil_windows
44
psutil._pswindows
5+
6+
# not always available on ARM64, but we test there
7+
psutil._psosx.cpu_freq

stubs/psutil/psutil/_psosx.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ net_if_addrs: Any
7070
def net_connections(kind: str = "inet"): ...
7171
def net_if_stats(): ...
7272
def boot_time(): ...
73+
74+
INIT_BOOT_TIME: float
75+
76+
def adjust_proc_create_time(ctime: float) -> float: ...
7377
def users(): ...
7478
def pids(): ...
7579

@@ -96,7 +100,7 @@ class Process:
96100
def memory_info(self): ...
97101
def memory_full_info(self): ...
98102
def cpu_times(self): ...
99-
def create_time(self): ...
103+
def create_time(self, monotonic: bool = False): ...
100104
def num_ctx_switches(self): ...
101105
def num_threads(self): ...
102106
def open_files(self): ...

stubs/psutil/psutil/_psutil_osx.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def cpu_times(*args, **kwargs) -> Any: ...
2929
def disk_io_counters(*args, **kwargs) -> Any: ...
3030
def disk_partitions(*args, **kwargs) -> Any: ...
3131
def disk_usage_used(*args, **kwargs) -> Any: ...
32+
def has_cpu_freq(*args, **kwargs) -> bool: ...
3233
def net_io_counters(*args, **kwargs) -> Any: ...
3334
def per_cpu_times(*args, **kwargs) -> Any: ...
3435
def pids(*args, **kwargs) -> Any: ...
@@ -47,5 +48,4 @@ def proc_threads(*args, **kwargs) -> Any: ...
4748
def sensors_battery(*args, **kwargs) -> Any: ...
4849
def set_debug(*args, **kwargs) -> Any: ...
4950
def swap_mem(*args, **kwargs) -> Any: ...
50-
def users(*args, **kwargs) -> Any: ...
5151
def virtual_mem(*args, **kwargs) -> Any: ...

0 commit comments

Comments
 (0)