Your message dated Fri, 25 Sep 2026 04:19:07 +0000
with message-id <[email protected]>
and subject line Bug#1144468: fixed in python-psutil 7.2.2-1
has caused the Debian Bug report #1144468,
regarding python-psutil: RLIM_INFINITY changes in python 3.15
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1144468: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1144468
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:python-psutil
Version: 7.1.0-1
User: [email protected]
Usertags: python3.15
Hi!
While rebuilding packages against Python 3.15 we found that
python-psutil produces some errors in the tests. This is due to a change
in Python 3.15 resources handling
(https://docs.python.org/3.15/whatsnew/3.15.html#porting-to-python-3-15):
- resource.RLIM_INFINITY is now always positive. Passing a negative
integer value that corresponded to its old value (such as -1 or -3,
depending on platform) to resource.setrlimit() and resource.prlimit()
is now deprecated. (Contributed by Serhiy Storchaka in gh-137044.)
While python-psutil tests rely on RLIM_INFINITY to be -1.
Note that this was already a problem when building against pypy and the
tests were skipped to build against pypy.
As there are many dependencies that require psutil I'm applying the
attached patch to the package in the build sandbox (we are using the
debusine.debian.net provided by freexian to make the test the rebuilds).
But while the patch seems to be inline with what upstream plans to do
for the version 8.0 it might be worth having a conversation as otherwise
psutils.RLIM_INFINITY will be different to resource.RLIM_INFINITY. Which
seems to be an overlooked consequence of the current fix.
(To be fair, allowing psutils.RLIM_INFINITY to change when psutil builds
against Python 3.15 is a minor api breakage, which might not be
acceptable for python-psutil upstream developers.)
Please consider either applying this patch or something similar to the
psutil package to allow it to build against Python 3.15.
Happy hacking,
--
"It is practically impossible to teach good programming to students that have
had a prior exposure to BASIC: as potential programmers they are mentally
mutilated beyond hope of regeneration."
-- Edsger W. Dijkstra
Saludos /\/\ /\ >< `/
diff -Nru python-psutil-7.1.0/debian/changelog
python-psutil-7.1.0/debian/changelog
--- python-psutil-7.1.0/debian/changelog 2025-10-05 08:26:16.000000000
+0200
+++ python-psutil-7.1.0/debian/changelog 2026-08-15 12:05:08.000000000
+0200
@@ -1,3 +1,9 @@
+python-psutil (7.1.0-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+
+ -- Maximiliano Curia <[email protected]> Sat, 15 Aug 2026 12:05:08 +0200
+
python-psutil (7.1.0-1) unstable; urgency=medium
* New upstream release
diff -Nru
python-psutil-7.1.0/debian/patches/0001-dont-depend-on-install-when-running-tests.patch
python-psutil-7.1.0/debian/patches/0001-dont-depend-on-install-when-running-tests.patch
---
python-psutil-7.1.0/debian/patches/0001-dont-depend-on-install-when-running-tests.patch
2025-10-05 08:26:16.000000000 +0200
+++
python-psutil-7.1.0/debian/patches/0001-dont-depend-on-install-when-running-tests.patch
2026-08-15 12:05:08.000000000 +0200
@@ -3,12 +3,14 @@
Subject: dont depend on install when running tests
---
- Makefile | 12 ------------
- 1 file changed, 12 deletions(-)
+ Makefile | 16 ----------------
+ 1 file changed, 16 deletions(-)
+diff --git a/Makefile b/Makefile
+index a57c4fe..6cc7410 100644
--- a/Makefile
+++ b/Makefile
-@@ -91,67 +91,51 @@ install-git-hooks: ## Install GIT pre-c
+@@ -91,67 +91,51 @@ install-git-hooks: ## Install GIT pre-commit hook.
# ===================================================================
test: ## Run all tests. To run a specific test do "make test
ARGS=psutil.tests.test_system.TestDiskAPIs"
diff -Nru
python-psutil-7.1.0/debian/patches/0002-pass-PYTHONPATH-to-the-test-runner.patch
python-psutil-7.1.0/debian/patches/0002-pass-PYTHONPATH-to-the-test-runner.patch
---
python-psutil-7.1.0/debian/patches/0002-pass-PYTHONPATH-to-the-test-runner.patch
2025-10-05 08:26:16.000000000 +0200
+++
python-psutil-7.1.0/debian/patches/0002-pass-PYTHONPATH-to-the-test-runner.patch
2026-08-15 12:05:08.000000000 +0200
@@ -6,6 +6,8 @@
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
+diff --git a/Makefile b/Makefile
+index 6cc7410..be62430 100644
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,14 @@
diff -Nru
python-psutil-7.1.0/debian/patches/0003-Handle-RLIM_INFINITY-on-Python-3.15-on-linux-2871.patch
python-psutil-7.1.0/debian/patches/0003-Handle-RLIM_INFINITY-on-Python-3.15-on-linux-2871.patch
---
python-psutil-7.1.0/debian/patches/0003-Handle-RLIM_INFINITY-on-Python-3.15-on-linux-2871.patch
1970-01-01 01:00:00.000000000 +0100
+++
python-psutil-7.1.0/debian/patches/0003-Handle-RLIM_INFINITY-on-Python-3.15-on-linux-2871.patch
2026-08-15 12:05:08.000000000 +0200
@@ -0,0 +1,72 @@
+From: Giampaolo Rodola <[email protected]>
+Date: Fri, 17 Jul 2026 19:46:19 +0200
+Subject: Handle RLIM_INFINITY on Python 3.15 on linux (#2871)
+
+Origin: upstream,
https://github.com/giampaolo/psutil/commit/b408cfc0a05266a0509ccbb13e253f2d2000ed9f
+Bug: https://github.com/giampaolo/psutil/issues/2871
+
+`Process.rlimit` returns `RLIM_INFINITY` as unsigned `2**64-1` instead
+of `-1` on Python 3.15+, which changed `resource.prlimit()` accordingly.
+psutil now maps it back to `psutil.RLIM_INFINITY` so the value stays
+consistent across Python versions.
+---
+ psutil/_pslinux.py | 13 ++++++++++++-
+ psutil/tests/test_linux.py | 14 ++++++++++++++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py
+index b5095d4..3321654 100644
+--- a/psutil/_pslinux.py
++++ b/psutil/_pslinux.py
+@@ -83,6 +83,10 @@ PAGESIZE = cext_posix.getpagesize()
+ LITTLE_ENDIAN = sys.byteorder == 'little'
+ UNSET = object()
+
++# Python 3.15 changed resource.prlimit() to return RLIM_INFINITY as the
++# unsigned 2**64-1 instead of -1; used to map it back to -1.
++RLIM_INFINITY_UNSIGNED = cext_posix.RLIM_INFINITY & 0xFFFFFFFFFFFFFFFF
++
+ # "man iostat" states that sectors are equivalent with blocks and have
+ # a size of 512 bytes. Despite this value can be queried at runtime
+ # via /sys/block/{DISK}/queue/hw_sector_size and results may vary
+@@ -2213,7 +2217,14 @@ class Process:
+ try:
+ if limits is None:
+ # get
+- return resource.prlimit(self.pid, resource_)
++ soft, hard = resource.prlimit(self.pid, resource_)
++ # Python 3.15 returns RLIM_INFINITY as the unsigned
++ # 2**64-1 instead of -1; map it back for consistency.
++ if soft == RLIM_INFINITY_UNSIGNED:
++ soft = cext_posix.RLIM_INFINITY
++ if hard == RLIM_INFINITY_UNSIGNED:
++ hard = cext_posix.RLIM_INFINITY
++ return soft, hard
+ else:
+ # set
+ if len(limits) != 2:
+diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
+index 5e325e5..7eb7469 100755
+--- a/psutil/tests/test_linux.py
++++ b/psutil/tests/test_linux.py
+@@ -2197,6 +2197,20 @@ class TestProcess(PsutilTestCase):
+ assert p._proc.create_time() != p._proc.create_time(monotonic=True)
+ assert p._get_ident()[1] == p._proc.create_time(monotonic=True)
+
++ def test_rlimit_infinity_normalized(self):
++ # Python 3.15 changed resource.prlimit() to return RLIM_INFINITY
++ # as the unsigned 2**64-1 instead of -1; psutil maps it back.
++ unsigned = 2**64 - 1
++ p = psutil.Process()
++ with mock.patch(
++ "psutil._pslinux.resource.prlimit",
++ return_value=(unsigned, unsigned),
++ ) as m:
++ soft, hard = p.rlimit(psutil.RLIMIT_FSIZE)
++ assert m.called
++ assert soft == psutil.RLIM_INFINITY
++ assert hard == psutil.RLIM_INFINITY
++
+
+ @pytest.mark.skipif(not LINUX, reason="LINUX only")
+ class TestProcessAgainstStatus(PsutilTestCase):
diff -Nru
python-psutil-7.1.0/debian/patches/0004-tests-normalize-RLIM_INFINITY-from-resource-getrlimit.patch
python-psutil-7.1.0/debian/patches/0004-tests-normalize-RLIM_INFINITY-from-resource-getrlimit.patch
---
python-psutil-7.1.0/debian/patches/0004-tests-normalize-RLIM_INFINITY-from-resource-getrlimit.patch
1970-01-01 01:00:00.000000000 +0100
+++
python-psutil-7.1.0/debian/patches/0004-tests-normalize-RLIM_INFINITY-from-resource-getrlimit.patch
2026-08-15 12:05:08.000000000 +0200
@@ -0,0 +1,25 @@
+From: Maximiliano Curia <[email protected]>
+Date: Sat, 15 Aug 2026 11:20:00 +0200
+Subject: tests: normalize RLIM_INFINITY from resource.getrlimit()
+
+---
+ psutil/tests/test_process.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
+index 264f3ed..c96f1f7 100755
+--- a/psutil/tests/test_process.py
++++ b/psutil/tests/test_process.py
+@@ -431,7 +431,11 @@ class TestProcess(PsutilTestCase):
+ # number instead of -1. It looks like a bug with PyPy.
+ if PYPY:
+ continue
+- assert p.rlimit(value) == resource.getrlimit(value)
++ limits = tuple(
++ psutil.RLIM_INFINITY if x == resource.RLIM_INFINITY else x
++ for x in resource.getrlimit(value)
++ )
++ assert p.rlimit(value) == limits
+ else:
+ ret = p.rlimit(value)
+ assert len(ret) == 2
diff -Nru python-psutil-7.1.0/debian/patches/series
python-psutil-7.1.0/debian/patches/series
--- python-psutil-7.1.0/debian/patches/series 2025-10-05 08:26:16.000000000
+0200
+++ python-psutil-7.1.0/debian/patches/series 2026-08-15 12:05:08.000000000
+0200
@@ -1,2 +1,4 @@
0001-dont-depend-on-install-when-running-tests.patch
0002-pass-PYTHONPATH-to-the-test-runner.patch
+0003-Handle-RLIM_INFINITY-on-Python-3.15-on-linux-2871.patch
+0004-tests-normalize-RLIM_INFINITY-from-resource-getrlimit.patch
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Source: python-psutil
Source-Version: 7.2.2-1
Done: Sandro Tosi <[email protected]>
We believe that the bug you reported is fixed in the latest version of
python-psutil, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sandro Tosi <[email protected]> (supplier of updated python-psutil package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 25 Sep 2026 00:03:17 -0400
Source: python-psutil
Architecture: source
Version: 7.2.2-1
Distribution: unstable
Urgency: medium
Maintainer: Sandro Tosi <[email protected]>
Changed-By: Sandro Tosi <[email protected]>
Closes: 1123688 1124134 1129000 1144468
Changes:
python-psutil (7.2.2-1) unstable; urgency=medium
.
* New upstream release; Closes: #1129000
* debian/patches/*
- drop patches to upstream Makefile, obsolete and unused by the build
- backport upstream fix for RLIM_INFINITY on Python 3.15, and adjust
test_rlimit_get accordingly (patch by Maximiliano Curia);
Closes: #1144468
* debian/control
- bump debhelper compat to 14
- use dh-sequence-python3
- use dh-sequence-single-binary, to keep the compat 13 install behavior
- multiarchify python b-d, to fix FTCBFS (patch by Helmut Grohne);
Closes: #1123688
- drop pytest-subtests from b-d, now part of pytest >= 9.0.1;
Closes: #1124134
- drop Priority: optional, the default
- bump Standards-Version to 4.7.4.1
* debian/rules
- enable all hardening flags
- drop APPVEYOR workaround, no longer used by the tests
- skip test_memleaks.py, it requires psleak, not in Debian
* debian/pybuild.testfiles
- copy tests/ into the build dir, upstream moved them out of the package
* debian/copyright
- extend packaging copyright years
* debian/watch
- convert to version 5, using the GitHub template
Checksums-Sha1:
6f9f0bcf52b8f2eb50545f47a7d8190150edd265 2169 python-psutil_7.2.2-1.dsc
9d4c2478f39c87517c12e54b11f6069504b9d2d7 1862172
python-psutil_7.2.2.orig.tar.xz
119a5be6d33e908498e604557711bc9a0a05bdb7 7372
python-psutil_7.2.2-1.debian.tar.xz
1671b10b4cfbad6b186cc1a9b627f4a5797c55b4 8704
python-psutil_7.2.2-1_source.buildinfo
Checksums-Sha256:
9ea99e833beb35f0a5b3c229a2f7f55cf32dacc01dc1037485d6dd2aaa763e10 2169
python-psutil_7.2.2-1.dsc
579ca1ddd31fba475909c50c232a9da5fef95001656333ba0c3342ce75c3533f 1862172
python-psutil_7.2.2.orig.tar.xz
5d775bd8b8cc26095cdc45551722ef1f8addc3a63e6c35780f95687c8468fc4a 7372
python-psutil_7.2.2-1.debian.tar.xz
b4f7f648df042c7861b6be11d513afc3d59bac71038daada211cfe638c09a6e0 8704
python-psutil_7.2.2-1_source.buildinfo
Files:
e9281f037b1bd23797b1b8711045dad0 2169 python optional python-psutil_7.2.2-1.dsc
61672d18859f48087e736a64f0a14ba1 1862172 python optional
python-psutil_7.2.2.orig.tar.xz
581f4a12afee66e8325fb255e1de3ea4 7372 python optional
python-psutil_7.2.2-1.debian.tar.xz
8758974bc4c1cf65cbaa0bf371ccca24 8704 python optional
python-psutil_7.2.2-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEufrTGSrz5KUwnZ05h588mTgBqU8FAmq18pkACgkQh588mTgB
qU9CHg/+NzX43vsQ+xT+uaMROkd8nNRx1JTmPrYMxetb8jH86Z2Pe2xdGgmlvzeb
8hlLQtr+zf25Y71DN+ja0J+HzEfbpmWQVLREFP27Bm+RHZNSgyMKEw74NIY/L5aF
8Mqkbh9EbSLiRwAxgrqPgYbZ9ft5Sr3Z+cJbnoWnWqo5uc0aCuyZqmtQcoobMyej
YVS/eBnKW4n3BODXp8qR9/wgSe2s2lVEkE6LamlYecS/YUBXERsIS9fGul3eCWS9
laMdaQmvhULIeV9OjNC8a0pJzh2/jMJNdRCivM0mUvUgYtIMtHBVjz2mzvztHIV4
mgbdu+mEycxkg3BIEDXrMUaxC8hjfR4gEXnHGJhvrPpX+YwVIKU2AofN/xmdfwMX
kGStQ56mftzBa/PHuhWWooGEVUHonbnVyNWcu7N3KctBV7LFSp8MW0nh+ODNNaLf
tA7JBF2HT0IZQptMSdEIvGDMyaOIaE7gZ7VRrfD2kWymvGEUMDxEeQbzJAgLjMoU
aJcInftZvOxDEFobfLVDMV2nLoG7VzePLMCFq8w0QCdv4viEOFinQiLUo/bgUwd3
LEdpLgkII80HI9cs/IQs+5Kmh8eYTaZbPKo7VBZqbsvUBwEcbBlZpQRDzV2tBx5u
G2y+xxsnnzkBfA8LSsJq0/xmklCwKknTovJwUYCanY0K2lJZXlw=
=TWGj
-----END PGP SIGNATURE-----
pgp3fvzlvRlem.pgp
Description: PGP signature
--- End Message ---