From dfeda1fd8150618d0445e574ad272910904e1a74 Mon Sep 17 00:00:00 2001 From: David Dorfman Date: Thu, 8 Feb 2024 15:21:44 +0200 Subject: [PATCH 1/3] upgrade psutil --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a9074b3c..07dd59eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -psutil~=5.8.0 +psutil~=5.9.8 requests~=2.31.0 grpcio~=1.43.0 protobuf~=3.19.4 From e335c578997ec9b6d6c4c29b64439207495051ef Mon Sep 17 00:00:00 2001 From: David Dorfman Date: Wed, 14 Feb 2024 20:59:14 +0200 Subject: [PATCH 2/3] linux: process: Remove zombie check (fixed in psutil) --- granulate_utils/linux/process.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/granulate_utils/linux/process.py b/granulate_utils/linux/process.py index 59e7e980..45680b6b 100644 --- a/granulate_utils/linux/process.py +++ b/granulate_utils/linux/process.py @@ -35,17 +35,12 @@ def process_exe(process: psutil.Process) -> str: """ - psutil.Process(pid).exe() returns "" for zombie processes, incorrectly. It should raise ZombieProcess, and return "" - only for kernel threads. - - See https://github.com/giampaolo/psutil/pull/2062 + psutil.Process(pid).exe() caches the result. This function returns the up-to-date exe in case the process exec-ed. """ - # Clear the "exe" cache on the process object. It can change after being cached if the process execed. + # Clear the "exe" cache on the process object process._exe = None # type: ignore exe = process.exe() if exe == "": - if is_process_zombie(process): - raise psutil.ZombieProcess(process.pid) raise MissingExePath(process) return exe From 459763f7c11a296f93a1de45056519d54fab031a Mon Sep 17 00:00:00 2001 From: David Dorfman Date: Mon, 9 Sep 2024 01:46:42 +0300 Subject: [PATCH 3/3] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 07dd59eb..c8e10b18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -psutil~=5.9.8 +psutil~=6.0.0 requests~=2.31.0 grpcio~=1.43.0 protobuf~=3.19.4