From db1f5a8e8d03809b46eb97f6f7a4c052d2ea0cd0 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sun, 15 Mar 2026 01:50:52 +0100 Subject: [PATCH] gnu: python-psutil: Update to 7.2.2. * gnu/packages/python-xyz.scm (python-psutil): Update to 7.2.2. [source]: Switch to git-fetch. [arguments]<#:tests?>: Drop keyword. <#:test-flags>: Ignore failing tests. <#:phases>: Add phase 'prepare-tests. [native-inputs]: Add procps, python-packaging, python-pytest, python-pytest-instafail, python-pytest-xdist. Change-Id: Ie2f094d1f8d039a9692de4075aa1a0f17745cd22 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 48 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0992161958..3bebaf058f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4934,20 +4934,52 @@ access the technical and tag data for video and audio files.") (define-public python-psutil (package (name "python-psutil") - (version "7.0.0") + (version "7.2.2") (source (origin - (method url-fetch) - (uri (pypi-uri "psutil" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/giampaolo/psutil") + (commit (string-append "release-" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0mn42p9pzh0wynhk9i18iyvp8h54hbcsyczajmjcpv4blgmw7sbv")))) + (base32 "1p5j3v78x795dd4xilmnvsswl09pkc81g9ax66akjdr0hkdnyl56")))) (build-system pyproject-build-system) (arguments - ;; FIXME: some tests do not return and time out. Some tests fail because - ;; some processes survive kill(). - '(#:tests? #f)) + (list + #:test-flags + #~(list "--ignore=tests/test_memleaks.py" ; Missing python-psleak + "-k" (string-join + ;; Permission errors. + (list "not test_mtu" + "test_comparisons" + "test_disk_partitions_mocked" + "test_serialization" + "test_weird_environ" + "test_who" + "test_users" + "test_disk_io_counters" + ;; Modules not found. + "test_import_all" + "test_invocation" + ;; assert 16363520 < 10485760 + "test_against_df") + " and not ")) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-tests + (lambda _ + (delete-file-recursively "psutil") + (substitute* "tests/test_linux.py" + (("\"(free|vmstat)\"" _ cmd) + (format #f "~s" (which cmd))))))))) (native-inputs - (list python-setuptools)) + (list procps + python-packaging + python-pytest + python-pytest-instafail + python-pytest-xdist + python-setuptools)) (home-page "https://github.com/giampaolo/psutil") (synopsis "Library for retrieving information on running processes") (description