- update to 5.7.3:

- 809_: [FreeBSD] add support for `Process.rlimit()`.
  - 893_: [BSD] add support for `Process.environ()` (patch by Armin Gruner)
  - 1830_: [UNIX] `net_if_stats()`'s `isup` also checks whether the NIC is
    running (meaning Wi-Fi or ethernet cable is connected).
  - 1837_: [Linux] improved battery detection and charge "secsleft" calculation
  - 1620_: [Linux] physical cpu_count() result is incorrect on systems with more
    than one CPU socket.
  - 1738_: [macOS] Process.exe() may raise FileNotFoundError if process is still
    alive but the exe file which launched it got deleted.
  - 1791_: [macOS] fix missing include for getpagesize().
  - 1823_: [Windows] Process.open_files() may cause a segfault due to a NULL
    pointer.
  - 1838_: [Linux] sensors_battery(): if `percent` can be determined but not
    the remaining values, still return a result instead of None.
- skip-obs.patch, skip_failing_tests.patch: rediff

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=124
This commit is contained in:
Dirk Mueller 2020-12-01 12:58:09 +00:00 committed by Git OBS Bridge
parent b1f793a420
commit 2e988699e7
6 changed files with 47 additions and 56 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:90990af1c3c67195c44c9a889184f84f5b2320dce3ee3acbd054e3ba0b4a7beb
size 460198

3
psutil-5.7.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:af73f7bcebdc538eda9cc81d19db1db7bf26f103f91081d780bbacfcb620dee2
size 465556

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Tue Dec 1 12:55:06 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 5.7.3:
- 809_: [FreeBSD] add support for `Process.rlimit()`.
- 893_: [BSD] add support for `Process.environ()` (patch by Armin Gruner)
- 1830_: [UNIX] `net_if_stats()`'s `isup` also checks whether the NIC is
running (meaning Wi-Fi or ethernet cable is connected).
- 1837_: [Linux] improved battery detection and charge "secsleft" calculation
- 1620_: [Linux] physical cpu_count() result is incorrect on systems with more
than one CPU socket.
- 1738_: [macOS] Process.exe() may raise FileNotFoundError if process is still
alive but the exe file which launched it got deleted.
- 1791_: [macOS] fix missing include for getpagesize().
- 1823_: [Windows] Process.open_files() may cause a segfault due to a NULL
pointer.
- 1838_: [Linux] sensors_battery(): if `percent` can be determined but not
the remaining values, still return a result instead of None.
- skip-obs.patch, skip_failing_tests.patch: rediff
-------------------------------------------------------------------
Tue Nov 3 10:15:29 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -24,7 +24,7 @@
%endif
%bcond_without python2
Name: python-psutil
Version: 5.7.2
Version: 5.7.3
Release: 0
Summary: A process utilities module for Python
License: BSD-3-Clause

View File

@ -1,20 +1,7 @@
Index: psutil-5.7.2/psutil/tests/__init__.py
Index: psutil-5.7.3/psutil/tests/test_misc.py
===================================================================
--- psutil-5.7.2.orig/psutil/tests/__init__.py
+++ psutil-5.7.2/psutil/tests/__init__.py
@@ -185,7 +185,7 @@ HAS_SENSORS_BATTERY = hasattr(psutil, "s
try:
HAS_BATTERY = HAS_SENSORS_BATTERY and bool(psutil.sensors_battery())
except Exception:
- HAS_BATTERY = True
+ HAS_BATTERY = False
HAS_SENSORS_FANS = hasattr(psutil, "sensors_fans")
HAS_SENSORS_TEMPERATURES = hasattr(psutil, "sensors_temperatures")
HAS_THREADS = hasattr(psutil.Process, "threads")
Index: psutil-5.7.2/psutil/tests/test_misc.py
===================================================================
--- psutil-5.7.2.orig/psutil/tests/test_misc.py
+++ psutil-5.7.2/psutil/tests/test_misc.py
--- psutil-5.7.3.orig/psutil/tests/test_misc.py
+++ psutil-5.7.3/psutil/tests/test_misc.py
@@ -664,7 +664,7 @@ class TestScripts(PsutilTestCase):
src = f.read()
ast.parse(src)
@ -33,20 +20,11 @@ Index: psutil-5.7.2/psutil/tests/test_misc.py
self.assert_stdout('disk_usage.py')
def test_free(self):
@@ -763,6 +763,8 @@ class TestScripts(PsutilTestCase):
def test_battery(self):
self.assert_stdout('battery.py')
+ @unittest.skipIf(not HAS_SENSORS_BATTERY, "not supported")
+ @unittest.skipIf(not HAS_BATTERY, "no battery")
def test_sensors(self):
self.assert_stdout('sensors.py')
Index: psutil-5.7.2/psutil/tests/test_linux.py
Index: psutil-5.7.3/psutil/tests/test_linux.py
===================================================================
--- psutil-5.7.2.orig/psutil/tests/test_linux.py
+++ psutil-5.7.2/psutil/tests/test_linux.py
@@ -637,7 +637,7 @@ class TestSystemCPUCountLogical(PsutilTe
--- psutil-5.7.3.orig/psutil/tests/test_linux.py
+++ psutil-5.7.3/psutil/tests/test_linux.py
@@ -682,7 +682,7 @@ class TestSystemCPUCountLogical(PsutilTe
self.assertEqual(psutil.cpu_count(logical=True), num)
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
@ -55,7 +33,7 @@ Index: psutil-5.7.2/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)
@@ -680,7 +680,7 @@ class TestSystemCPUCountLogical(PsutilTe
@@ -725,7 +725,7 @@ class TestSystemCPUCountLogical(PsutilTe
class TestSystemCPUCountPhysical(PsutilTestCase):
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
@ -64,7 +42,7 @@ Index: psutil-5.7.2/psutil/tests/test_linux.py
out = sh("lscpu -p")
core_ids = set()
for line in out.split('\n'):
@@ -1009,7 +1009,7 @@ class TestSystemDiskPartitions(PsutilTes
@@ -1080,7 +1080,7 @@ class TestSystemDiskPartitions(PsutilTes
@unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available")
@skip_on_not_implemented()
@ -73,7 +51,7 @@ Index: psutil-5.7.2/psutil/tests/test_linux.py
# test psutil.disk_usage() and psutil.disk_partitions()
# against "df -a"
def df(path):
@@ -1183,7 +1183,7 @@ class TestSystemDiskIoCounters(PsutilTes
@@ -1254,7 +1254,7 @@ class TestSystemDiskIoCounters(PsutilTes
self.assertEqual(ret.read_count, 1)
self.assertEqual(ret.write_count, 5)
@ -82,10 +60,10 @@ Index: psutil-5.7.2/psutil/tests/test_linux.py
def exists(path):
if path == '/proc/diskstats':
return False
Index: psutil-5.7.2/psutil/tests/test_posix.py
Index: psutil-5.7.3/psutil/tests/test_posix.py
===================================================================
--- psutil-5.7.2.orig/psutil/tests/test_posix.py
+++ psutil-5.7.2/psutil/tests/test_posix.py
--- psutil-5.7.3.orig/psutil/tests/test_posix.py
+++ psutil-5.7.3/psutil/tests/test_posix.py
@@ -371,7 +371,7 @@ class TestSystemAPIs(PsutilTestCase):
# AIX can return '-' in df output instead of numbers, e.g. for /proc
@ -95,11 +73,11 @@ Index: psutil-5.7.2/psutil/tests/test_posix.py
def df(device):
out = sh("df -k %s" % device).strip()
line = out.split('\n')[1]
Index: psutil-5.7.2/psutil/tests/test_system.py
Index: psutil-5.7.3/psutil/tests/test_system.py
===================================================================
--- psutil-5.7.2.orig/psutil/tests/test_system.py
+++ psutil-5.7.2/psutil/tests/test_system.py
@@ -589,7 +589,7 @@ class TestDiskAPIs(PsutilTestCase):
--- psutil-5.7.3.orig/psutil/tests/test_system.py
+++ psutil-5.7.3/psutil/tests/test_system.py
@@ -591,7 +591,7 @@ class TestDiskAPIs(PsutilTestCase):
def test_disk_usage_bytes(self):
psutil.disk_usage(b'.')

View File

@ -1,24 +1,17 @@
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -1500,6 +1500,8 @@ class TestSensorsBattery(unittest.TestCa
Index: psutil-5.7.3/psutil/tests/test_linux.py
===================================================================
--- psutil-5.7.3.orig/psutil/tests/test_linux.py
+++ psutil-5.7.3/psutil/tests/test_linux.py
@@ -1564,6 +1564,8 @@ class TestSensorsBattery(PsutilTestCase)
self.assertIsNone(psutil.sensors_battery().power_plugged)
assert m.called
+ @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_now'),
+ 'Missing /sys/class/power_supply/BAT0/energy_now file.')
def test_emulate_no_base_files(self):
# Emulate a case where base metrics files are not present,
# in which case we're supposed to get None.
@@ -1511,6 +1513,8 @@ class TestSensorsBattery(unittest.TestCa
IOError(errno.ENOENT, "")):
self.assertIsNone(psutil.sensors_battery())
+ @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_full'),
+ 'Missing /sys/class/power_supply/BAT0/energy_full file.')
def test_emulate_energy_full_0(self):
# Emulate a case where energy_full files returns 0.
with mock_open_content(
@@ -1518,6 +1522,8 @@ class TestSensorsBattery(unittest.TestCa
@@ -1571,6 +1573,8 @@ class TestSensorsBattery(PsutilTestCase)
self.assertEqual(psutil.sensors_battery().percent, 0)
assert m.called