11import sys
22
3- # TODO: Detect available POSIX constants/methods and import them in this module
4- # (see psutil_posix_add_constants / psutil_posix_add_methods)
5-
63if sys .platform == "darwin" :
74 from _typeshed import StrOrBytesPath
85 from collections .abc import Sequence
96 from socket import AddressFamily , SocketKind
107 from typing import Final , TypeVar
118
12- from ._psutil_posix import (
13- AF_LINK as AF_LINK ,
14- getpagesize as getpagesize ,
15- net_if_addrs as net_if_addrs ,
16- net_if_duplex_speed as net_if_duplex_speed ,
17- net_if_flags as net_if_flags ,
18- net_if_is_running as net_if_is_running ,
19- net_if_mtu as net_if_mtu ,
20- )
21-
229 _T = TypeVar ("_T" )
2310
2411 version : Final [int ]
@@ -44,7 +31,6 @@ if sys.platform == "darwin":
4431 def proc_cwd (pid : int , / ) -> str : ...
4532 def proc_environ (pid : int , / ) -> str : ...
4633 def proc_exe (pid : int , / ) -> str : ...
47- def proc_is_zombie (pid : int , / ) -> bool : ...
4834 def proc_kinfo_oneshot (pid : int , / ) -> tuple [int , int , int , int , int , int , int , float , int , str ]: ...
4935 def proc_memory_uss (pid : int , / ) -> int : ...
5036 def proc_name (pid : int , / ) -> str : ...
@@ -67,12 +53,12 @@ if sys.platform == "darwin":
6753 def disk_io_counters () -> dict [str , tuple [int , int , int , int , int , int ]]: ...
6854 def disk_partitions () -> list [tuple [str , str , str , str ]]: ...
6955 def disk_usage_used (mount_point : StrOrBytesPath , default : _T , / ) -> int | _T : ...
70- def has_cpu_freq () -> bool : ...
7156 def net_io_counters () -> dict [str , tuple [int , int , int , int , int , int , int , int ]]: ...
7257 def per_cpu_times () -> list [tuple [float , float , float , float ]]: ...
7358 def pids () -> list [int ]: ...
7459 def sensors_battery () -> tuple [int , int , int ]: ...
7560 def swap_mem () -> tuple [int , int , int , int , int ]: ...
61+ def users () -> list [tuple [str , str , str , float , int ]]: ...
7662 def virtual_mem () -> tuple [int , int , int , int , int , int ]: ...
7763 def check_pid_range (pid : int , / ) -> None : ...
7864 def set_debug (value : bool , / ) -> None : ...
0 commit comments