Update dependency psutil to v6 (master) #38
Merged
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.9.0
->==6.0.0
Release Notes
giampaolo/psutil (psutil)
v6.0.0
Compare Source
======
2024-06-18
Enhancements
maxfile
andmaxpath
fields were removed from the namedtuplereturned by
disk_partitions()
_. Reason: on network filesystems (NFS) thiscan potentially take a very long time to complete.
process_iter()
_ no longer pre-emptively checks whether PIDs havebeen reused. This makes
process_iter()
_ around 20x times faster.psutil.process_iter.cache_clear()
API can be used the clearprocess_iter()
_ internal cache.Process.connections()
_ was renamed toProcess.net_connections()
_.The old name is still available, but it's deprecated (triggers a
DeprecationWarning
) and will be removed in the future.Bug fixes
Process.cmdline()
_ sometimes fail with EBUSY. It usuallyhappens for long cmdlines with lots of arguments. In this case retry getting
the cmdline for up to 50 times, and return an empty list as last resort.
by Shade Gladden)
pid_exists()
_ disagrees withProcess
_ onwhether a pid exists when ERROR_ACCESS_DENIED.
pid_exists()
_ erroneously return True if the argument isa thread ID (TID) instead of a PID (process ID).
MNT_
constants.
Porting notes
Version 6.0.0 introduces some changes which affect backward compatibility:
disk_partitions()
_' no longer hasmaxfile
andmaxpath
fields.process_iter()
_ no longer pre-emptively checks whether PIDs havebeen reused. If you want to check for PID reusage you are supposed to use
Process.is_running()
_ against the yieldedProcess
_ instances. That willalso automatically remove reused PIDs from
process_iter()
_ internal cache.Process.connections()
_ was renamed toProcess.net_connections()
_.The old name is still available, but it's deprecated (triggers a
DeprecationWarning
) and will be removed in the future.v5.9.8
Compare 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 formin
andmax
frequencies in all Apple Silicon chips.
v5.9.7
Compare Source
=====
2023-12-17
Enhancements
raw-string-in-exception
, which helps providingclearer tracebacks when exceptions are raised by psutil.
Bug fixes
PyErr_SetExcFromWindowsErrWithFilenameObject
cPython API.v5.9.6
Compare 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()
_.ruff
Python 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_DEBUG
instead.
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 returnFalse
for 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.5
Compare Source
=====
2023-04-17
Enhancements
KeyError
bit deriving from a missed cache hit.DeprecationWarning
orUserWarning
is 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
None
or 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/meminfo
returns0
(possibly a kernel bug), in which case wecalculate an approximation for
available
memory which matches "free"CLI utility.
disk_partitions()
: do not unnecessarily read/proc/filesystems and raise
AccessDenied
unless user specifiedall=False
argument.
Matthieu Darbois)
users()
_ loses precision forstarted
attribute (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 raiseFileNotFoundError
if cwd no longer exists. Return an empty string instead.
v5.9.4
Compare 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_UNKNOWN
definition. (patch by Amir Rossert)IFM_1000_TX
andIFM_1000_T
are thesame value, causing a build failure. (patch by Lawrence D'Anna)
(patch by Daniel Widdis)
v5.9.3
Compare 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_speed
symbol.net_if_stats()
_ 'sflags
on 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.2
Compare 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.1
Compare Source
=====
2022-05-20
Enhancements
Kemenade)
read(2)
buffer size from 1k to 32k when reading/proc
pseudo 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_rollup
instead of/proc/pids/smaps
,which makes it 5 times faster.
Bug fixes
AttributeError
is raised ifpsutil.Error
class is raisedmanually and passed through
str
.cpu_freq()
_ erroneously returnscurr
value in GHz whilemin
andmax
are in MHz.virtual_memory()
_ may raiseValueError
if running in aLCX container.
Configuration
📅 Schedule: Branch creation - "after 5pm on the first day of the month" in timezone Europe/Zurich, 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.