Open
Conversation
1f39bf2 to
f8ebacb
Compare
f8ebacb to
7ba4192
Compare
7ba4192 to
7471f6b
Compare
7471f6b to
30b6af3
Compare
30b6af3 to
e20f825
Compare
e20f825 to
5259ed8
Compare
5259ed8 to
6f4c5b3
Compare
6f4c5b3 to
0dabb57
Compare
0dabb57 to
e79bacb
Compare
|
e79bacb to
47fd05e
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This PR contains the following updates:
==5.7.2→==5.9.8Release Notes
giampaolo/psutil (psutil)
v5.9.8Compare Source
=====
2024-01-19
Enhancements
net_connections()_ returned list in C instead ofPython, and avoid to retrieve unnecessary connection types unless explicitly
asked. E.g., on an IDLE system with few IPv6 connections this will run around
4 times faster. Before all connection types (TCP, UDP, UNIX) were retrieved
internally, even if only a portion was returned.
Bug fixes
net_connections()_ implementation was broken.It could either leak memory or core dump.
Process.cwd()_ will return anempty string instead of raising
NoSuchProcess_.cpu_freq()now returns fixed values forminandmaxfrequencies in all Apple Silicon chips.
v5.9.7Compare Source
=====
2023-12-17
Enhancements
raw-string-in-exception, which helps providingclearer tracebacks when exceptions are raised by psutil.
Bug fixes
PyErr_SetExcFromWindowsErrWithFilenameObjectcPython API.v5.9.6Compare Source
=====
2023-10-15
Enhancements
cpu_percent()_ andcpu_times_percent()_ are now thread safe,meaning they can be called from different threads and still return
meaningful and independent results. Before, if (say) 10 threads called
cpu_percent(interval=None)at the same time, only 1 thread out of 10would get the right result.
Process_ class is passed a very high PID, raiseNoSuchProcess_instead of OverflowError. (patch by Xuehai Pan)
Process.ppid()_ andProcess.parents()_.ruffPython linter instead offlake8 + isort. It's anorder of magnitude faster + it adds a ton of new code quality checks.
Bug fixes
can't be read due to permission error. Redirect it to
PSUTIL_DEBUGinstead.
Klausner)
swap_memory()_(patch by student_2333)
bytes2human()utility function was unable to properly representnegative values.
disk_usage()_ fails on Python 3.12+. (patch byMatthieu Darbois)
Process.memory_full_info()_ may incorrectly raiseZombieProcess_ if it's determined via/proc/pid/smaps_rollup. Insteadwe now fallback on reading
/proc/pid/smaps.Process.is_running()_ erroneously returnFalsefor zombie processes, because creation time cannot be determined.ZombieProcess_ onProcess.exe(),Process.cmdline()andProcess.memory_maps()_ instead of returning a"null" value.
pre-emptively checked for
Process.nice()_ (set),Process.ionice(),(set),
Process.cpu_affinity()(set),Process.rlimit()_(set),
Process.parent()_.Process.threads()_ always fail with AccessDenied (also asroot).
v5.9.5Compare Source
=====
2023-04-17
Enhancements
KeyErrorbit deriving from a missed cache hit.DeprecationWarningorUserWarningis raised.
net_connections()_ implementation was rewrittenfrom scratch:
empty string)
Process.cwd()_ cannot be determined(e.g. directory no longer exists), in which case we returned either
Noneor an empty string. This was consolidated and we now return
""on allplatforms.
its truncated
Process.name()_ (15 chars), don't fail withZombieProcess_when we try to guess the full name from the
Process.cmdline()_. Justreturn the truncated name.
OpenBSD platforms (python 3 only).
Bug fixes
net_connections()_ returns duplicate entries."MemAvailable"field from/proc/meminforeturns0(possibly a kernel bug), in which case wecalculate an approximation for
availablememory which matches "free"CLI utility.
disk_partitions(): do not unnecessarily read/proc/filesystems and raise
AccessDeniedunless user specifiedall=Falseargument.
Matthieu Darbois)
users()_ loses precision forstartedattribute (off by1 minute).
NoSuchProcess_ may be raised instead ofZombieProcess_.virtual_memory()_ is higher than total.virtual_memory()_ metrics are wrong: available andused are too high. We now match values shown by htop CLI utility.
Process.num_threads()_ andProcess.threads()_ returnthreads that are already terminated.
Process.cwd()_ may raiseFileNotFoundErrorif cwd no longer exists. Return an empty string instead.
v5.9.4Compare Source
=====
2022-11-07
Enhancements
macOS and Windows. This allows to use pre-built wheels in all future versions
of cPython 3. (patch by Matthieu Darbois)
Bug fixes
virtual_memory()_. (patch byDaniel Widdis)
SPEED_UNKNOWNdefinition. (patch by Amir Rossert)IFM_1000_TXandIFM_1000_Tare thesame value, causing a build failure. (patch by Lawrence D'Anna)
(patch by Daniel Widdis)
v5.9.3Compare Source
=====
2022-10-18
Enhancements
Darbois)
Bug fixes
net_connections()_ fails with RuntimeError.Process.environ()_ may contain garbage data. Fixout-of-bounds read around
sysctl_procargs. (patch by Bernhard Urban-Forster)undefined
ethtool_cmd_speedsymbol.net_if_stats()_ 'sflagson Python 2 returned unicodeinstead of str. (patch by Matthieu Darbois)
Process.threads()_ may raiseNoSuchProcess. Fix racecondition. (patch by Daniel Li)
(patch by Matthieu Darbois)
v5.9.2Compare Source
=====
2022-09-04
Bug fixes
pids()_ may fail with ENOMEM. Dynamicallyincrease the
malloc()buffer size until it's big enough.net_if_stats()_ returns incorrect interface speed for100GbE network cards.
virtual_memory()_ may raise ENOMEM due tomissing
#include <sys/param.h>directive. (patch by Peter Jeremy)swap_memory()_ was miscalculated. (patch by Thomas Klausner)v5.9.1Compare Source
=====
2022-05-20
Enhancements
Kemenade)
read(2)buffer size from 1k to 32k when reading/procpseudo files line by line. This should help having more consistentresults.
cpu_freq()_.Process.memory_full_info()_ (reporting process USS/PSS/Swapmemory) now reads
/proc/pid/smaps_rollupinstead of/proc/pids/smaps,which makes it 5 times faster.
Bug fixes
AttributeErroris raised ifpsutil.Errorclass is raisedmanually and passed through
str.cpu_freq()_ erroneously returnscurrvalue in GHz whileminandmaxare in MHz.virtual_memory()_ may raiseValueErrorif running in aLCX container.
v5.9.0Compare Source
=====
2021-12-29
Enhancements
cpu_freq()_ is slow on systems with many CPUs. Read currentfrequency values for all CPUs from
/proc/cpuinfoinstead of opening manyfiles in
/sysfs. (patch by marxin)NoSuchProcess_ message now specifies if the PID has been reused.NoSuchProcess,AccessDenied, etc.) now have a betterformatted and separated
__repr__and__str__implementations.disk_partitions()_: convert/dev/rootdevice (an aliasused on some Linux distros) to real root device path.
PSUTIL_DEBUGmode now prints file name and line number of the debugmessages coming from C extension modules.
Bug fixes
cpu_freq()_minandmaxare set to0 if can't be determined (instead of crashing).
Process.connections()_ will crash withEOPNOTSUPPfor one connection; this is now ignored.disk_partitions()_ only returns mountpoints on driveswhere it first finds one.
cpu_freq()_ broken on Apple M1.Process.open_files()_ andProcess.connections(), could randomly raiseAccessDeniedbecause theinternal buffer of
proc_pidinfo(PROC_PIDLISTFDS)syscall was not big enough.We now dynamically increase the buffer size until it's big enough instead of
giving up and raising
AccessDenied_, which was a fallback to avoid crashing.OpenProcessfails withERROR_SUCCESSdue toGetLastError()called aftersprintf(). (patch by alxchk)wait_procs()_ should catchsubprocess.TimeoutExpiredexception.
sensors_battery()_ can raiseTypeErroron PureOS.swap_memory()_ shows committed memory instead of swap.ENAMETOOLONGwhen accessing processfile descriptors in procfs. (patch by Nikita Radchenko)
memoize_when_activateddecorator is not thread-safe.(patch by Xuehai Pan)
disk_partitions()_ crashes due toinsufficient buffer len. (patch by MaWe2019)
when calling
users()_ multiple times.Process.name()_ longerthan 128 characters resulting in
AccessDenied_. This is now fixed. (patchby PetrPospisil)
process_iter()_ is not thread safe and can raiseTypeErrorif invoked from multiple threads.Process.cpu_times()_ reports incorrect timings on M1 machines.(patch by Olivier Dormond)
cpu_freq()_ return order is wrong on systems with more than9 CPUs.
v5.8.0Compare Source
v5.7.3Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.