From ef49f5ae165c2100e7ff9c4ef6f4c615eb0d1fc5bba572eb5b2e30d9891a7f6b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 22:54:30 +0000 Subject: [PATCH] - update to 5.9.0: * [Linux]: `cpu_freq()`_ is slow on systems with many CPUs. Read current frequency values for all CPUs from ``/proc/cpuinfo`` instead of opening many files in ``/sys`` fs. (patch by marxin) * `NoSuchProcess`_ message now specifies if the PID has been reused. * error classes (`NoSuchProcess`_, `AccessDenied`_, etc.) now have a better formatted and separated ``__repr__`` and ``__str__`` implementations. * [Linux]: `disk_partitions()`_: convert ``/dev/root`` device (an alias used on some Linux distros) to real root device path. * ``PSUTIL_DEBUG`` mode now prints file name and line number of the debug messages coming from C extension modules. * rewrite HISTORY.rst to use hyperlinks pointing to psutil API doc. * [Linux]: `wait_procs()`_ should catch ``subprocess.TimeoutExpired`` exception. * [Linux]: `sensors_battery()`_ can raise ``TypeError`` on PureOS. * [Linux]: psutil does not handle ``ENAMETOOLONG`` when accessing process file descriptors in procfs. (patch by Nikita Radchenko) * **[critical]**: ``memoize_when_activated`` decorator is not thread-safe. * **[critical]**: `process_iter()`_ is not thread safe and can raise ``TypeError`` if invoked from multiple threads. * [Linux]: `cpu_freq()`_ return order is wrong on systems with more than 9 CPUs. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=136 --- psutil-5.8.0.tar.gz | 3 -- psutil-5.9.0.tar.gz | 3 ++ python-psutil.changes | 26 ++++++++++++++++++ python-psutil.spec | 4 +-- skip-obs.patch | 64 +++++++++++++++++++++---------------------- 5 files changed, 63 insertions(+), 37 deletions(-) delete mode 100644 psutil-5.8.0.tar.gz create mode 100644 psutil-5.9.0.tar.gz diff --git a/psutil-5.8.0.tar.gz b/psutil-5.8.0.tar.gz deleted file mode 100644 index c852adc..0000000 --- a/psutil-5.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6 -size 470886 diff --git a/psutil-5.9.0.tar.gz b/psutil-5.9.0.tar.gz new file mode 100644 index 0000000..aa3c3bc --- /dev/null +++ b/psutil-5.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869842dbd66bb80c3217158e629d6fceaecc3a3166d3d1faee515b05dd26ca25 +size 478322 diff --git a/python-psutil.changes b/python-psutil.changes index 3a8d828..0b2f272 100644 --- a/python-psutil.changes +++ b/python-psutil.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Mon Jan 10 22:51:40 UTC 2022 - Dirk Müller + +- update to 5.9.0: + * [Linux]: `cpu_freq()`_ is slow on systems with many CPUs. Read current + frequency values for all CPUs from ``/proc/cpuinfo`` instead of opening many + files in ``/sys`` fs. (patch by marxin) + * `NoSuchProcess`_ message now specifies if the PID has been reused. + * error classes (`NoSuchProcess`_, `AccessDenied`_, etc.) now have a better + formatted and separated ``__repr__`` and ``__str__`` implementations. + * [Linux]: `disk_partitions()`_: convert ``/dev/root`` device (an alias + used on some Linux distros) to real root device path. + * ``PSUTIL_DEBUG`` mode now prints file name and line number of the debug + messages coming from C extension modules. + * rewrite HISTORY.rst to use hyperlinks pointing to psutil API doc. + * [Linux]: `wait_procs()`_ should catch ``subprocess.TimeoutExpired`` + exception. + * [Linux]: `sensors_battery()`_ can raise ``TypeError`` on PureOS. + * [Linux]: psutil does not handle ``ENAMETOOLONG`` when accessing process + file descriptors in procfs. (patch by Nikita Radchenko) + * **[critical]**: ``memoize_when_activated`` decorator is not thread-safe. + * **[critical]**: `process_iter()`_ is not thread safe and can raise + ``TypeError`` if invoked from multiple threads. + * [Linux]: `cpu_freq()`_ return order is wrong on systems with more than + 9 CPUs. + ------------------------------------------------------------------- Thu Nov 25 04:05:30 UTC 2021 - Steve Kowalik diff --git a/python-psutil.spec b/python-psutil.spec index 408b2c3..d53358b 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-psutil # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ %endif %bcond_without python2 Name: python-psutil -Version: 5.8.0 +Version: 5.9.0 Release: 0 Summary: A process utilities module for Python License: BSD-3-Clause diff --git a/skip-obs.patch b/skip-obs.patch index dc4674f..aa62e4c 100644 --- a/skip-obs.patch +++ b/skip-obs.patch @@ -1,16 +1,16 @@ -Index: psutil-5.8.0/psutil/tests/test_misc.py +Index: psutil-5.9.0/psutil/tests/test_misc.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_misc.py -+++ psutil-5.8.0/psutil/tests/test_misc.py -@@ -354,6 +354,7 @@ class TestMisc(PsutilTestCase): - check(psutil.disk_usage(os.getcwd())) - check(psutil.users()) +--- psutil-5.9.0.orig/psutil/tests/test_misc.py ++++ psutil-5.9.0/psutil/tests/test_misc.py +@@ -368,6 +368,7 @@ class TestMisc(PsutilTestCase): + # XXX: https://github.com/pypa/setuptools/pull/2896 + @unittest.skipIf(APPVEYOR, "temporarily disabled due to setuptools bug") + @unittest.skipIf(True, 'does not work on obs') def test_setup_script(self): setup_py = os.path.join(ROOT_DIR, 'setup.py') if CI_TESTING and not os.path.exists(setup_py): -@@ -667,7 +668,7 @@ class TestScripts(PsutilTestCase): +@@ -710,7 +711,7 @@ class TestScripts(PsutilTestCase): src = f.read() ast.parse(src) @@ -19,20 +19,20 @@ Index: psutil-5.8.0/psutil/tests/test_misc.py # make sure all example scripts have a test method defined meths = dir(self) for name in os.listdir(SCRIPTS_DIR): -@@ -685,7 +686,7 @@ class TestScripts(PsutilTestCase): - if not stat.S_IXUSR & os.stat(path)[stat.ST_MODE]: - self.fail('%r is not executable' % path) +@@ -729,7 +730,7 @@ class TestScripts(PsutilTestCase): + if not stat.S_IXUSR & os.stat(path)[stat.ST_MODE]: + raise self.fail('%r is not executable' % path) - def test_disk_usage(self): + def _test_disk_usage(self): self.assert_stdout('disk_usage.py') def test_free(self): -Index: psutil-5.8.0/psutil/tests/test_linux.py +Index: psutil-5.9.0/psutil/tests/test_linux.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_linux.py -+++ psutil-5.8.0/psutil/tests/test_linux.py -@@ -675,7 +675,7 @@ class TestSystemCPUCountLogical(PsutilTe +--- psutil-5.9.0.orig/psutil/tests/test_linux.py ++++ psutil-5.9.0/psutil/tests/test_linux.py +@@ -683,7 +683,7 @@ class TestSystemCPUCountLogical(PsutilTe self.assertEqual(psutil.cpu_count(logical=True), num) @unittest.skipIf(not which("lscpu"), "lscpu utility not available") @@ -41,8 +41,8 @@ Index: psutil-5.8.0/psutil/tests/test_linux.py out = sh("lscpu -p") num = len([x for x in out.split('\n') if not x.startswith('#')]) self.assertEqual(psutil.cpu_count(logical=True), num) -@@ -718,7 +718,7 @@ class TestSystemCPUCountLogical(PsutilTe - class TestSystemCPUCountPhysical(PsutilTestCase): +@@ -726,7 +726,7 @@ class TestSystemCPUCountLogical(PsutilTe + class TestSystemCPUCountCores(PsutilTestCase): @unittest.skipIf(not which("lscpu"), "lscpu utility not available") - def test_against_lscpu(self): @@ -50,7 +50,7 @@ Index: psutil-5.8.0/psutil/tests/test_linux.py out = sh("lscpu -p") core_ids = set() for line in out.split('\n'): -@@ -1068,7 +1068,7 @@ class TestSystemDiskPartitions(PsutilTes +@@ -1072,7 +1072,7 @@ class TestSystemDiskPartitions(PsutilTes @unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available") @skip_on_not_implemented() @@ -59,7 +59,7 @@ Index: psutil-5.8.0/psutil/tests/test_linux.py # test psutil.disk_usage() and psutil.disk_partitions() # against "df -a" def df(path): -@@ -1242,7 +1242,7 @@ class TestSystemDiskIoCounters(PsutilTes +@@ -1246,7 +1246,7 @@ class TestSystemDiskIoCounters(PsutilTes self.assertEqual(ret.read_count, 1) self.assertEqual(ret.write_count, 5) @@ -68,11 +68,11 @@ Index: psutil-5.8.0/psutil/tests/test_linux.py def exists(path): if path == '/proc/diskstats': return False -Index: psutil-5.8.0/psutil/tests/test_posix.py +Index: psutil-5.9.0/psutil/tests/test_posix.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_posix.py -+++ psutil-5.8.0/psutil/tests/test_posix.py -@@ -376,7 +376,7 @@ class TestSystemAPIs(PsutilTestCase): +--- psutil-5.9.0.orig/psutil/tests/test_posix.py ++++ psutil-5.9.0/psutil/tests/test_posix.py +@@ -377,7 +377,7 @@ class TestSystemAPIs(PsutilTestCase): # AIX can return '-' in df output instead of numbers, e.g. for /proc @unittest.skipIf(AIX, "unreliable on AIX") @retry_on_failure() @@ -81,10 +81,10 @@ Index: psutil-5.8.0/psutil/tests/test_posix.py def df(device): out = sh("df -k %s" % device).strip() line = out.split('\n')[1] -Index: psutil-5.8.0/psutil/tests/test_system.py +Index: psutil-5.9.0/psutil/tests/test_system.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_system.py -+++ psutil-5.8.0/psutil/tests/test_system.py +--- psutil-5.9.0.orig/psutil/tests/test_system.py ++++ psutil-5.9.0/psutil/tests/test_system.py @@ -200,6 +200,7 @@ class TestMiscAPIs(PsutilTestCase): self.assertLess(bt, time.time()) @@ -102,10 +102,10 @@ Index: psutil-5.8.0/psutil/tests/test_system.py def check_ntuple(nt): self.assertIsInstance(nt.device, str) self.assertIsInstance(nt.mountpoint, str) -Index: psutil-5.8.0/psutil/tests/test_contracts.py +Index: psutil-5.9.0/psutil/tests/test_contracts.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_contracts.py -+++ psutil-5.8.0/psutil/tests/test_contracts.py +--- psutil-5.9.0.orig/psutil/tests/test_contracts.py ++++ psutil-5.9.0/psutil/tests/test_contracts.py @@ -246,6 +246,7 @@ class TestSystemAPITypes(PsutilTestCase) self.assertIsInstance(k, str) self.assert_ntuple_of_nums(v, type_=(int, long)) @@ -114,11 +114,11 @@ Index: psutil-5.8.0/psutil/tests/test_contracts.py def test_disk_partitions(self): # Duplicate of test_system.py. Keep it anyway. for disk in psutil.disk_partitions(): -Index: psutil-5.8.0/psutil/tests/test_process.py +Index: psutil-5.9.0/psutil/tests/test_process.py =================================================================== ---- psutil-5.8.0.orig/psutil/tests/test_process.py -+++ psutil-5.8.0/psutil/tests/test_process.py -@@ -344,6 +344,7 @@ class TestProcess(PsutilTestCase): +--- psutil-5.9.0.orig/psutil/tests/test_process.py ++++ psutil-5.9.0/psutil/tests/test_process.py +@@ -343,6 +343,7 @@ class TestProcess(PsutilTestCase): @unittest.skipIf(not HAS_IONICE, "not supported") @unittest.skipIf(not LINUX, "linux only")