HariSekhon / DevOps-Python-tools

80+ DevOps & Data CLI Tools - AWS, GCP, GCF Python Cloud Functions, Log Anonymizer, Spark, Hadoop, HBase, Hive, Impala, Linux, Docker, Spark Data Converters & Validators (Avro/Parquet/JSON/CSV/INI/XML/YAML), Travis CI, AWS CloudFormation, Elasticsearch, Solr etc.
https://www.linkedin.com/in/HariSekhon
MIT License
772 stars 340 forks source link

Update psutil to 5.7.0 #9

Closed pyup-bot closed 4 years ago

pyup-bot commented 4 years ago

This PR updates psutil from 4.3.0 to 5.7.0.

Changelog ### 5.7.0 ``` ===== 2020-12-18 **Enhancements** - 1637_: [SunOS] add partial support for old SunOS 5.10 Update 0 to 3. - 1648_: [Linux] sensors_temperatures() looks into an additional /sys/device/ directory for additional data. (patch by Javad Karabi) - 1652_: [Windows] dropped support for Windows XP and Windows Server 2003. Minimum supported Windows version now is Windows Vista. - 1671_: [FreeBSD] add CI testing/service for FreeBSD (Cirrus CI). - 1677_: [Windows] process exe() will succeed for all process PIDs (instead of raising AccessDenied). - 1679_: [Windows] net_connections() and Process.connections() are 10% faster. - 1682_: [PyPy] added CI / test integration for PyPy via Travis. - 1686_: [Windows] added support for PyPy on Windows. - 1693_: [Windows] boot_time(), Process.create_time() and users()'s login time now have 1 micro second precision (before the precision was of 1 second). **Bug fixes** - 1538_: [NetBSD] process cwd() may return ENOENT instead of NoSuchProcess. - 1627_: [Linux] Process.memory_maps() can raise KeyError. - 1642_: [SunOS] querying basic info for PID 0 results in FileNotFoundError. - 1646_: [FreeBSD] many Process methods may cause a segfault on FreeBSD 12.0 due to a backward incompatible change in a C type introduced in 12.0. - 1656_: [Windows] Process.memory_full_info() raises AccessDenied even for the current user and os.getpid(). - 1660_: [Windows] Process.open_files() complete rewrite + check of errors. - 1662_: [Windows] process exe() may raise WinError 0. - 1665_: [Linux] disk_io_counters() does not take into account extra fields added to recent kernels. (patch by Mike Hommey) - 1672_: use the right C type when dealing with PIDs (int or long). Thus far (long) was almost always assumed, which is wrong on most platforms. - 1673_: [OpenBSD] Process connections(), num_fds() and threads() returned improper exception if process is gone. - 1674_: [SunOS] disk_partitions() may raise OSError. - 1684_: [Linux] disk_io_counters() may raise ValueError on systems not having /proc/diskstats. - 1695_: [Linux] could not compile on kernels <= 2.6.13 due to PSUTIL_HAVE_IOPRIO not being defined. (patch by Anselm Kruis) ``` ### 5.6.7 ``` ===== 2019-11-26 **Bug fixes** - 1630_: [Windows] can't compile source distribution due to C syntax error. ``` ### 5.6.6 ``` ===== 2019-11-25 **Bug fixes** - 1179_: [Linux] Process cmdline() now takes into account misbehaving processes renaming the command line and using inappropriate chars to separate args. - 1616_: use of Py_DECREF instead of Py_CLEAR will result in double free and segfault (`CVE-2019-18874 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18874>`__). (patch by Riccardo Schirone) - 1619_: [OpenBSD] compilation fails due to C syntax error. (patch by Nathan Houghton) ``` ### 5.6.5 ``` ===== 2019-11-06 **Bug fixes** - 1615_: remove pyproject.toml as it was causing installation issues. ``` ### 5.6.4 ``` ===== 2019-11-04 **Enhancements** - 1527_: [Linux] added Process.cpu_times().iowait counter, which is the time spent waiting for blocking I/O to complete. - 1565_: add PEP 517/8 build backend and requirements specification for better pip integration. (patch by Bernát Gábor) **Bug fixes** - 875_: [Windows] Process' cmdline(), environ() or cwd() may occasionally fail with ERROR_PARTIAL_COPY which now gets translated to AccessDenied. - 1126_: [Linux] cpu_affinity() segfaults on CentOS 5 / manylinux. cpu_affinity() support for CentOS 5 was removed. - 1528_: [AIX] compilation error on AIX 7.2 due to 32 vs 64 bit differences. (patch by Arnon Yaari) - 1535_: 'type' and 'family' fields returned by net_connections() are not always turned into enums. - 1536_: [NetBSD] process cmdline() erroneously raise ZombieProcess error if cmdline has non encodable chars. - 1546_: usage percent may be rounded to 0 on Python 2. - 1552_: [Windows] getloadavg() math for calculating 5 and 15 mins values is incorrect. - 1568_: [Linux] use CC compiler env var if defined. - 1570_: [Windows] `NtWow64*` syscalls fail to raise the proper error code - 1585_: [OSX] calling close() (in C) on possible negative integers. (patch by Athos Ribeiro) - 1606_: [SunOS] compilation fails on SunOS 5.10. (patch by vser1) ``` ### 5.6.3 ``` ===== 2019-06-11 **Enhancements** - 1494_: [AIX] added support for Process.environ(). (patch by Arnon Yaari) **Bug fixes** - 1276_: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) - 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. - 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) ``` ### 5.6.2 ``` ===== 2019-04-26 **Enhancements** - 604_: [Windows, Windows] add new psutil.getloadavg(), returning system load average calculation, including on Windows (emulated). (patch by Ammar Askar) - 1404_: [Linux] cpu_count(logical=False) uses a second method (read from `/sys/devices/system/cpu/cpu[0-9]/topology/core_id`) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. - 1458_: provide coloured test output. Also show failures on KeyboardInterrupt. - 1464_: various docfixes (always point to python3 doc, fix links, etc.). - 1476_: [Windows] it is now possible to set process high I/O priority (ionice()).Also, I/O priority values are now exposed as 4 new constants: IOPRIO_VERYLOW, IOPRIO_LOW, IOPRIO_NORMAL, IOPRIO_HIGH. - 1478_: add make command to re-run tests failed on last run. **Bug fixes** - 1223_: [Windows] boot_time() may return value on Windows XP. - 1456_: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) - 1462_: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) - 1463_: cpu_distribution.py script was broken. - 1470_: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) - 1471_: [SunOS] Process name() and cmdline() can return SystemError. (patch by Daniel Beer) - 1472_: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. - 1474_: fix formatting of psutil.tests() which mimicks 'ps aux' output. - 1475_: [Windows] OSError.winerror attribute wasn't properly checked resuling in WindowsError being raised instead of AccessDenied. - 1477_: [Windows] wrong or absent error handling for private NTSTATUS Windows APIs. Different process methods were affected by this. - 1480_: [Windows] psutil.cpu_count(logical=False) could cause a crash due to fixed read violation. (patch by Samer Masterson) - 1486_: [AIX, SunOS] AttributeError when interacting with Process methods involved into oneshot() context. - 1491_: [SunOS] net_if_addrs(): free() ifap struct on error. (patch by Agnewee) - 1493_: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. ``` ### 5.6.1 ``` ===== 2019-03-11 **Bug fixes** - 1329_: [AIX] psutil doesn't compile on AIX 6.1. (patch by Arnon Yaari) - 1448_: [Windows] crash on import due to rtlIpv6AddressToStringA not available on Wine. - 1451_: [Windows] Process.memory_full_info() segfaults. NtQueryVirtualMemory is now used instead of QueryWorkingSet to calculate USS memory. ``` ### 5.6.0 ``` ===== 2019-03-05 **Enhancements** - 1379_: [Windows] Process suspend() and resume() now use NtSuspendProcess and NtResumeProcess instead of stopping/resuming all threads of a process. This is faster and more reliable (aka this is what ProcessHacker does). - 1420_: [Windows] in case of exception disk_usage() now also shows the path name. - 1422_: [Windows] Windows APIs requiring to be dynamically loaded from DLL libraries are now loaded only once on startup (instead of on per function call) significantly speeding up different functions and methods. - 1426_: [Windows] PAGESIZE and number of processors is now calculated on startup. - 1428_: in case of error, the traceback message now shows the underlying C function called which failed. - 1433_: new Process.parents() method. (idea by Ghislain Le Meur) - 1437_: pids() are returned in sorted order. - 1442_: python3 is now the default interpreter used by Makefile. **Bug fixes** - 1353_: process_iter() is now thread safe (it rarely raised TypeError). - 1394_: [Windows] Process name() and exe() may erroneously return "Registry". QueryFullProcessImageNameW is now used instead of GetProcessImageFileNameW in order to prevent that. - 1411_: [BSD] lack of Py_DECREF could cause segmentation fault on process instantiation. - 1419_: [Windows] Process.environ() raises NotImplementedError when querying a 64-bit process in 32-bit-WoW mode. Now it raises AccessDenied. - 1427_: [OSX] Process cmdline() and environ() may erroneously raise OSError on failed malloc(). - 1429_: [Windows] SE DEBUG was not properly set for current process. It is now, and it should result in less AccessDenied exceptions for low-pid processes. - 1432_: [Windows] Process.memory_info_ex()'s USS memory is miscalculated because we're not using the actual system PAGESIZE. - 1439_: [NetBSD] Process.connections() may return incomplete results if using oneshot(). - 1447_: original exception wasn't turned into NSP/AD exceptions when using Process.oneshot() ctx manager. **Incompatible API changes** - 1291_: [OSX] Process.memory_maps() was removed because inherently broken (segfault) for years. ``` ### 5.5.1 ``` ===== 2019-02-15 **Enhancements** - 1348_: [Windows] on Windows >= 8.1 if Process.cmdline() fails due to ERROR_ACCESS_DENIED attempt using NtQueryInformationProcess + ProcessCommandLineInformation. (patch by EccoTheFlintstone) **Bug fixes** - 1394_: [Windows] Process.exe() returns "[Error 0] The operation completed successfully" when Python process runs in "Virtual Secure Mode". - 1402_: psutil exceptions' repr() show the internal private module path. - 1408_: [AIX] psutil won't compile on AIX 7.1 due to missing header. (patch by Arnon Yaari) ``` ### 5.5.0 ``` ===== 2019-01-23 **Enhancements** - 1350_: [FreeBSD] added support for sensors_temperatures(). (patch by Alex Manuskin) - 1352_: [FreeBSD] added support for CPU frequency. (patch by Alex Manuskin) **Bug fixes** - 1111_: Process.oneshot() is now thread safe. - 1354_: [Linux] disk_io_counters() fails on Linux kernel 4.18+. - 1357_: [Linux] Process' memory_maps() and io_counters() method are no longer exposed if not supported by the kernel. - 1368_: [Windows] fix psutil.Process().ionice(...) mismatch. (patch by EccoTheFlintstone) - 1370_: [Windows] improper usage of CloseHandle() may lead to override the original error code when raising an exception. - 1373_: incorrect handling of cache in Process.oneshot() context causes Process instances to return incorrect results. - 1376_: [Windows] OpenProcess() now uses PROCESS_QUERY_LIMITED_INFORMATION access rights wherever possible, resulting in less AccessDenied exceptions being thrown for system processes. - 1376_: [Windows] check if variable is NULL before free()ing it. (patch by EccoTheFlintstone) ``` ### 5.4.8 ``` ===== 2018-10-30 **Enhancements** - 1197_: [Linux] cpu_freq() is now implemented by parsing /proc/cpuinfo in case /sys/devices/system/cpu/* filesystem is not available. - 1310_: [Linux] psutil.sensors_temperatures() now parses /sys/class/thermal in case /sys/class/hwmon fs is not available (e.g. Raspberry Pi). (patch by Alex Manuskin) - 1320_: [Posix] better compilation support when using g++ instead of gcc. (patch by Jaime Fullaondo) **Bug fixes** - 715_: do not print exception on import time in case cpu_times() fails. - 1004_: [Linux] Process.io_counters() may raise ValueError. - 1277_: [OSX] available and used memory (psutil.virtual_memory()) metrics are not accurate. - 1294_: [Windows] psutil.Process().connections() may sometimes fail with intermittent 0xC0000001. (patch by Sylvain Duchesne) - 1307_: [Linux] disk_partitions() does not honour PROCFS_PATH. - 1320_: [AIX] system CPU times (psutil.cpu_times()) were being reported with ticks unit as opposed to seconds. (patch by Jaime Fullaondo) - 1332_: [OSX] psutil debug messages are erroneously printed all the time. (patch by Ilya Yanok) - 1346_: [SunOS] net_connections() returns an empty list. (patch by Oleksii Shevchuk) ``` ### 5.4.7 ``` ===== 2018-08-14 **Enhancements** - 1286_: [macOS] psutil.OSX constant is now deprecated in favor of new psutil.MACOS. - 1309_: [Linux] added psutil.STATUS_PARKED constant for Process.status(). - 1321_: [Linux] add disk_io_counters() dual implementation relying on /sys/block filesystem in case /proc/diskstats is not available. (patch by Lawrence Ye) **Bug fixes** - 1209_: [macOS] Process.memory_maps() may fail with EINVAL due to poor task_for_pid() syscall. AccessDenied is now raised instead. - 1278_: [macOS] Process.threads() incorrectly return microseconds instead of seconds. (patch by Nikhil Marathe) - 1279_: [Linux, macOS, BSD] net_if_stats() may return ENODEV. - 1294_: [Windows] psutil.Process().connections() may sometime fail with MemoryError. (patch by sylvainduchesne) - 1305_: [Linux] disk_io_stats() may report inflated r/w bytes values. - 1309_: [Linux] Process.status() is unable to recognize "idle" and "parked" statuses (returns '?'). - 1313_: [Linux] disk_io_counters() can report inflated IO counters due to erroneously counting base disk device and its partition(s) twice. - 1323_: [Linux] sensors_temperatures() may fail with ValueError. ``` ### 5.4.6 ``` ===== 2018-06-07 **Bug fixes** - 1258_: [Windows] Process.username() may cause a segfault (Python interpreter crash). (patch by Jean-Luc Migot) - 1273_: net_if_addr() namedtuple's name has been renamed from "snic" to "snicaddr". - 1274_: [Linux] there was a small chance Process.children() may swallow AccessDenied exceptions. ``` ### 5.4.5 ``` ===== 2018-04-14 **Bug fixes** - 1268_: setup.py's extra_require parameter requires latest setuptools version, breaking quite a lot of installations. ``` ### 5.4.4 ``` ===== 2018-04-13 **Enhancements** - 1239_: [Linux] expose kernel "slab" memory for psutil.virtual_memory(). (patch by Maxime Mouial) **Bug fixes** - 694_: [SunOS] cmdline() could be truncated at the 15th character when reading it from /proc. An extra effort is made by reading it from process address space first. (patch by Georg Sauthoff) - 771_: [Windows] cpu_count() (both logical and physical) return a wrong (smaller) number on systems using process groups (> 64 cores). - 771_: [Windows] cpu_times(percpu=True) return fewer CPUs on systems using process groups (> 64 cores). - 771_: [Windows] cpu_stats() and cpu_freq() may return incorrect results on systems using process groups (> 64 cores). - 1193_: [SunOS] Return uid/gid from /proc/pid/psinfo if there aren't enough permissions for /proc/pid/cred. (patch by Georg Sauthoff) - 1194_: [SunOS] Return nice value from psinfo as getpriority() doesn't support real-time processes. (patch by Georg Sauthoff) - 1194_: [SunOS] Fix double free in psutil_proc_cpu_num(). (patch by Georg Sauthoff) - 1194_: [SunOS] Fix undefined behavior related to strict-aliasing rules and warnings. (patch by Georg Sauthoff) - 1210_: [Linux] cpu_percent() steal time may remain stuck at 100% due to Linux erroneously reporting a decreased steal time between calls. (patch by Arnon Yaari) - 1216_: fix compatibility with python 2.6 on Windows (patch by Dan Vinakovsky) - 1222_: [Linux] Process.memory_full_info() was erroneously summing "Swap:" and "SwapPss:". Same for "Pss:" and "SwapPss". Not anymore. - 1224_: [Windows] Process.wait() may erroneously raise TimeoutExpired. - 1238_: [Linux] sensors_battery() may return None in case battery is not listed as "BAT0" under /sys/class/power_supply. - 1240_: [Windows] cpu_times() float loses accuracy in a long running system. (patch by stswandering) - 1245_: [Linux] sensors_temperatures() may fail with IOError "no such file". - 1255_: [FreeBSD] swap_memory() stats were erroneously represented in KB. (patch by Denis Krienbühl) **Backward compatibility** - 771_: [Windows] cpu_count(logical=False) on Windows XP and Vista is no longer supported and returns None. ``` ### 5.4.3 ``` ===== *2018-01-01* **Enhancements** - 775_: disk_partitions() on Windows return mount points. **Bug fixes** - 1193_: pids() may return False on macOS. ``` ### 5.4.2 ``` ===== *2017-12-07* **Enhancements** - 1173_: introduced PSUTIL_DEBUG environment variable which can be set in order to print useful debug messages on stderr (useful in case of nasty errors). - 1177_: added support for sensors_battery() on macOS. (patch by Arnon Yaari) - 1183_: Process.children() is 2x faster on UNIX and 2.4x faster on Linux. - 1188_: deprecated method Process.memory_info_ex() now warns by using FutureWarning instead of DeprecationWarning. **Bug fixes** - 1152_: [Windows] disk_io_counters() may return an empty dict. - 1169_: [Linux] users() "hostname" returns username instead. (patch by janderbrain) - 1172_: [Windows] `make test` does not work. - 1179_: [Linux] Process.cmdline() is now able to splits cmdline args for misbehaving processes which overwrite /proc/pid/cmdline and use spaces instead of null bytes as args separator. - 1181_: [macOS] Process.memory_maps() may raise ENOENT. - 1187_: [macOS] pids() does not return PID 0 on recent macOS versions. ``` ### 5.4.1 ``` ===== *2017-11-08* **Enhancements** - 1164_: [AIX] add support for Process.num_ctx_switches(). (patch by Arnon Yaari) - 1053_: abandon Python 3.3 support (psutil still works but it's no longer tested). **Bug fixes** - 1150_: [Windows] when a process is terminate()d now the exit code is set to SIGTERM instead of 0. (patch by Akos Kiss) - 1151_: python -m psutil.tests fail - 1154_: [AIX] psutil won't compile on AIX 6.1.0. (patch by Arnon Yaari) - 1167_: [Windows] net_io_counter() packets count now include also non-unicast packets. (patch by Matthew Long) ``` ### 5.4.0 ``` ===== *2017-10-12* **Enhancements** - 1123_: [AIX] added support for AIX platform. (patch by Arnon Yaari) **Bug fixes** - 1009_: [Linux] sensors_temperatures() may crash with IOError. - 1012_: [Windows] disk_io_counters()'s read_time and write_time were expressed in tens of micro seconds instead of milliseconds. - 1127_: [macOS] invalid reference counting in Process.open_files() may lead to segfault. (patch by Jakub Bacic) - 1129_: [Linux] sensors_fans() may crash with IOError. (patch by Sebastian Saip) - 1131_: [SunOS] fix compilation warnings. (patch by Arnon Yaari) - 1133_: [Windows] can't compile on newer versions of Visual Studio 2017 15.4. (patch by Max Bélanger) - 1138_: [Linux] can't compile on CentOS 5.0 and RedHat 5.0. (patch by Prodesire) ``` ### 5.3.1 ``` ===== *2017-09-10* **Enhancements** - 1124_: documentation moved to http://psutil.readthedocs.io **Bug fixes** - 1105_: [FreeBSD] psutil does not compile on FreeBSD 12. - 1125_: [BSD] net_connections() raises TypeError. **Compatibility notes** - 1120_: .exe files for Windows are no longer uploaded on PyPI as per PEP-527; only wheels are provided. ``` ### 5.3.0 ``` ===== *2017-09-01* **Enhancements** - 802_: disk_io_counters() and net_io_counters() numbers no longer wrap (restart from 0). Introduced a new "nowrap" argument. - 928_: psutil.net_connections() and psutil.Process.connections() "laddr" and "raddr" are now named tuples. - 1015_: swap_memory() now relies on /proc/meminfo instead of sysinfo() syscall so that it can be used in conjunction with PROCFS_PATH in order to retrieve memory info about Linux containers such as Docker and Heroku. - 1022_: psutil.users() provides a new "pid" field. - 1025_: process_iter() accepts two new parameters in order to invoke Process.as_dict(): "attrs" and "ad_value". With this you can iterate over all processes in one shot without needing to catch NoSuchProcess and do list/dict comprehensions. - 1040_: implemented full unicode support. - 1051_: disk_usage() on Python 3 is now able to accept bytes. - 1058_: test suite now enables all warnings by default. - 1060_: source distribution is dynamically generated so that it only includes relevant files. - 1079_: [FreeBSD] net_connections()'s fd number is now being set for real (instead of -1). (patch by Gleb Smirnoff) - 1091_: [SunOS] implemented Process.environ(). (patch by Oleksii Shevchuk) **Bug fixes** - 989_: [Windows] boot_time() may return a negative value. - 1007_: [Windows] boot_time() can have a 1 sec fluctuation between calls; the value of the first call is now cached so that boot_time() always returns the same value if fluctuation is <= 1 second. - 1013_: [FreeBSD] psutil.net_connections() may return incorrect PID. (patch by Gleb Smirnoff) - 1014_: [Linux] Process class can mask legitimate ENOENT exceptions as NoSuchProcess. - 1016_: disk_io_counters() raises RuntimeError on a system with no disks. - 1017_: net_io_counters() raises RuntimeError on a system with no network cards installed. - 1021_: [Linux] open_files() may erroneously raise NoSuchProcess instead of skipping a file which gets deleted while open files are retrieved. - 1029_: [macOS, FreeBSD] Process.connections('unix') on Python 3 doesn't properly handle unicode paths and may raise UnicodeDecodeError. - 1033_: [macOS, FreeBSD] memory leak for net_connections() and Process.connections() when retrieving UNIX sockets (kind='unix'). - 1040_: fixed many unicode related issues such as UnicodeDecodeError on Python 3 + UNIX and invalid encoded data on Windows. - 1042_: [FreeBSD] psutil won't compile on FreeBSD 12. - 1044_: [macOS] different Process methods incorrectly raise AccessDenied for zombie processes. - 1046_: [Windows] disk_partitions() on Windows overrides user's SetErrorMode. - 1047_: [Windows] Process username(): memory leak in case exception is thrown. - 1048_: [Windows] users()'s host field report an invalid IP address. - 1050_: [Windows] Process.memory_maps memory() leaks memory. - 1055_: cpu_count() is no longer cached; this is useful on systems such as Linux where CPUs can be disabled at runtime. This also reflects on Process.cpu_percent() which no longer uses the cache. - 1058_: fixed Python warnings. - 1062_: disk_io_counters() and net_io_counters() raise TypeError if no disks or NICs are installed on the system. - 1063_: [NetBSD] net_connections() may list incorrect sockets. - 1064_: [NetBSD] swap_memory() may segfault in case of error. - 1065_: [OpenBSD] Process.cmdline() may raise SystemError. - 1067_: [NetBSD] Process.cmdline() leaks memory if process has terminated. - 1069_: [FreeBSD] Process.cpu_num() may return 255 for certain kernel processes. - 1071_: [Linux] cpu_freq() may raise IOError on old RedHat distros. - 1074_: [FreeBSD] sensors_battery() raises OSError in case of no battery. - 1075_: [Windows] net_if_addrs(): inet_ntop() return value is not checked. - 1077_: [SunOS] net_if_addrs() shows garbage addresses on SunOS 5.10. (patch by Oleksii Shevchuk) - 1077_: [SunOS] net_connections() does not work on SunOS 5.10. (patch by Oleksii Shevchuk) - 1079_: [FreeBSD] net_connections() didn't list locally connected sockets. (patch by Gleb Smirnoff) - 1085_: cpu_count() return value is now checked and forced to None if <= 1. - 1087_: Process.cpu_percent() guard against cpu_count() returning None and assumes 1 instead. - 1093_: [SunOS] memory_maps() shows wrong 64 bit addresses. - 1094_: [Windows] psutil.pid_exists() may lie. Also, all process APIs relying on OpenProcess Windows API now check whether the PID is actually running. - 1098_: [Windows] Process.wait() may erroneously return sooner, when the PID is still alive. - 1099_: [Windows] Process.terminate() may raise AccessDenied even if the process already died. - 1101_: [Linux] sensors_temperatures() may raise ENODEV. **Porting notes** - 1039_: returned types consolidation: - Windows / Process.cpu_times(): fields 3 and 4 were int instead of float - Linux / FreeBSD: connections('unix'): raddr is now set to "" instead of None - OpenBSD: connections('unix'): laddr and raddr are now set to "" instead of None - 1040_: all strings are encoded by using OS fs encoding. - 1040_: the following Windows APIs on Python 2 now return a string instead of unicode: - Process.memory_maps().path - WindowsService.bin_path() - WindowsService.description() - WindowsService.display_name() - WindowsService.username() ``` ### 5.2.2 ``` ===== *2017-04-10* **Bug fixes** - 1000_: fixed some setup.py warnings. - 1002_: [SunOS] remove C macro which will not be available on new Solaris versions. (patch by Danek Duvall) - 1004_: [Linux] Process.io_counters() may raise ValueError. - 1006_: [Linux] cpu_freq() may return None on some Linux versions does not support the function; now the function is not declared instead. - 1009_: [Linux] sensors_temperatures() may raise OSError. - 1010_: [Linux] virtual_memory() may raise ValueError on Ubuntu 14.04. ``` ### 5.2.1 ``` ===== *2017-03-24* **Bug fixes** - 981_: [Linux] cpu_freq() may return an empty list. - 993_: [Windows] Process.memory_maps() on Python 3 may raise UnicodeDecodeError. - 996_: [Linux] sensors_temperatures() may not show all temperatures. - 997_: [FreeBSD] virtual_memory() may fail due to missing sysctl parameter on FreeBSD 12. ``` ### 5.2.0 ``` ===== *2017-03-05* **Enhancements** - 971_: [Linux] Add psutil.sensors_fans() function. (patch by Nicolas Hennion) - 976_: [Windows] Process.io_counters() has 2 new fields: *other_count* and *other_bytes*. - 976_: [Linux] Process.io_counters() has 2 new fields: *read_chars* and *write_chars*. **Bug fixes** - 872_: [Linux] can now compile on Linux by using MUSL C library. - 985_: [Windows] Fix a crash in `Process.open_files` when the worker thread for `NtQueryObject` times out. - 986_: [Linux] Process.cwd() may raise NoSuchProcess instead of ZombieProcess. ``` ### 5.1.3 ``` ===== **Bug fixes** - 971_: [Linux] sensors_temperatures() didn't work on CentOS 7. - 973_: cpu_percent() may raise ZeroDivisionError. ``` ### 5.1.2 ``` ===== *2017-02-03* **Bug fixes** - 966_: [Linux] sensors_battery().power_plugged may erroneously return None on Python 3. - 968_: [Linux] disk_io_counters() raises TypeError on python 3. - 970_: [Linux] sensors_battery()'s name and label fields on Python 3 are bytes instead of str. ``` ### 5.1.1 ``` ===== *2017-02-03* **Enhancements** - 966_: [Linux] sensors_battery().percent is a float and is more precise. **Bug fixes** - 964_: [Windows] Process.username() and psutil.users() may return badly decoding character on Python 3. - 965_: [Linux] disk_io_counters() may miscalculate sector size and report the wrong number of bytes read and written. - 966_: [Linux] sensors_battery() may fail with "no such file error". - 966_: [Linux] sensors_battery().power_plugged may lie. ``` ### 5.1.0 ``` ===== *2017-02-01* **Enhancements** - 357_: added psutil.Process.cpu_num() (what CPU a process is on). - 371_: added psutil.sensors_temperatures() (Linux only). - 941_: added psutil.cpu_freq() (CPU frequency). - 955_: added psutil.sensors_battery() (Linux, Windows, only). - 956_: cpu_affinity([]) can now be used as an alias to set affinity against all eligible CPUs. **Bug fixes** - 687_: [Linux] pid_exists() no longer returns True if passed a process thread ID. - 948_: cannot install psutil with PYTHONOPTIMIZE=2. - 950_: [Windows] Process.cpu_percent() was calculated incorrectly and showed higher number than real usage. - 951_: [Windows] the uploaded wheels for Python 3.6 64 bit didn't work. - 959_: psutil exception objects could not be pickled. - 960_: Popen.wait() did not return the correct negative exit status if process is ``kill()``ed by a signal. - 961_: [Windows] WindowsService.description() may fail with ERROR_MUI_FILE_NOT_FOUND. ``` ### 5.0.1 ``` ===== *2016-12-21* **Enhancements** - 939_: tar.gz distribution went from 1.8M to 258K. - 811_: [Windows] provide a more meaningful error message if trying to use psutil on unsupported Windows XP. **Bug fixes** - 609_: [SunOS] psutil does not compile on Solaris 10. - 936_: [Windows] fix compilation error on VS 2013 (patch by Max Bélanger). - 940_: [Linux] cpu_percent() and cpu_times_percent() was calculated incorrectly as "iowait", "guest" and "guest_nice" times were not properly taken into account. - 944_: [OpenBSD] psutil.pids() was omitting PID 0. ``` ### 5.0.0 ``` ===== *2016-11-06* **Enhncements** - 799_: new Process.oneshot() context manager making Process methods around +2x faster in general and from +2x to +6x faster on Windows. - 943_: better error message in case of version conflict on import. **Bug fixes** - 932_: [NetBSD] net_connections() and Process.connections() may fail without raising an exception. - 933_: [Windows] memory leak in cpu_stats() and WindowsService.description(). ``` ### 4.4.2 ``` ===== *2016-10-26* **Bug fixes** - 931_: psutil no longer compiles on Solaris. ``` ### 4.4.1 ``` ===== *2016-10-25* **Bug fixes** - 927_: ``Popen.__del__`` may cause maximum recursion depth error. ``` ### 4.4.0 ``` ===== *2016-10-23* **Enhancements** - 874_: [Windows] net_if_addrs() returns also the netmask. - 887_: [Linux] virtual_memory()'s 'available' and 'used' values are more precise and match "free" cmdline utility. "available" also takes into account LCX containers preventing "available" to overflow "total". - 891_: procinfo.py script has been updated and provides a lot more info. **Bug fixes** - 514_: [macOS] possibly fix Process.memory_maps() segfault (critical!). - 783_: [macOS] Process.status() may erroneously return "running" for zombie processes. - 798_: [Windows] Process.open_files() returns and empty list on Windows 10. - 825_: [Linux] cpu_affinity; fix possible double close and use of unopened socket. - 880_: [Windows] Handle race condition inside psutil_net_connections. - 885_: ValueError is raised if a negative integer is passed to cpu_percent() functions. - 892_: [Linux] Process.cpu_affinity([-1]) raise SystemError with no error set; now ValueError is raised. - 906_: [BSD] disk_partitions(all=False) returned an empty list. Now the argument is ignored and all partitions are always returned. - 907_: [FreeBSD] Process.exe() may fail with OSError(ENOENT). - 908_: [macOS, BSD] different process methods could errounesuly mask the real error for high-privileged PIDs and raise NoSuchProcess and AccessDenied instead of OSError and RuntimeError. - 909_: [macOS] Process open_files() and connections() methods may raise OSError with no exception set if process is gone. - 916_: [macOS] fix many compilation warnings. ``` ### 4.3.1 ``` ===== *2016-09-01* **Enhancements** - 881_: "make install" now works also when using a virtual env. **Bug fixes** - 854_: Process.as_dict() raises ValueError if passed an erroneous attrs name. - 857_: [SunOS] Process cpu_times(), cpu_percent(), threads() amd memory_maps() may raise RuntimeError if attempting to query a 64bit process with a 32bit python. "Null" values are returned as a fallback. - 858_: Process.as_dict() should not return memory_info_ex() because it's deprecated. - 863_: [Windows] memory_map truncates addresses above 32 bits - 866_: [Windows] win_service_iter() and services in general are not able to handle unicode service names / descriptions. - 869_: [Windows] Process.wait() may raise TimeoutExpired with wrong timeout unit (ms instead of sec). - 870_: [Windows] Handle leak inside psutil_get_process_data. ```
Links - PyPI: https://pypi.org/project/psutil - Changelog: https://pyup.io/changelogs/psutil/ - Repo: https://github.com/giampaolo/psutil
sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information