Accepting request 852339 from devel:languages:python
- 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/request/show/852339 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-psutil?expand=0&rev=58
This commit is contained in:
commit
146a92ce5f
@ -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
3
psutil-5.7.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:af73f7bcebdc538eda9cc81d19db1db7bf26f103f91081d780bbacfcb620dee2
|
||||||
|
size 465556
|
@ -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>
|
Tue Nov 3 10:15:29 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
%endif
|
%endif
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
Name: python-psutil
|
Name: python-psutil
|
||||||
Version: 5.7.2
|
Version: 5.7.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A process utilities module for Python
|
Summary: A process utilities module for Python
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
|
@ -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.3.orig/psutil/tests/test_misc.py
|
||||||
+++ psutil-5.7.2/psutil/tests/__init__.py
|
+++ psutil-5.7.3/psutil/tests/test_misc.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
|
|
||||||
@@ -664,7 +664,7 @@ class TestScripts(PsutilTestCase):
|
@@ -664,7 +664,7 @@ class TestScripts(PsutilTestCase):
|
||||||
src = f.read()
|
src = f.read()
|
||||||
ast.parse(src)
|
ast.parse(src)
|
||||||
@ -33,20 +20,11 @@ Index: psutil-5.7.2/psutil/tests/test_misc.py
|
|||||||
self.assert_stdout('disk_usage.py')
|
self.assert_stdout('disk_usage.py')
|
||||||
|
|
||||||
def test_free(self):
|
def test_free(self):
|
||||||
@@ -763,6 +763,8 @@ class TestScripts(PsutilTestCase):
|
Index: psutil-5.7.3/psutil/tests/test_linux.py
|
||||||
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
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- psutil-5.7.2.orig/psutil/tests/test_linux.py
|
--- psutil-5.7.3.orig/psutil/tests/test_linux.py
|
||||||
+++ psutil-5.7.2/psutil/tests/test_linux.py
|
+++ psutil-5.7.3/psutil/tests/test_linux.py
|
||||||
@@ -637,7 +637,7 @@ class TestSystemCPUCountLogical(PsutilTe
|
@@ -682,7 +682,7 @@ class TestSystemCPUCountLogical(PsutilTe
|
||||||
self.assertEqual(psutil.cpu_count(logical=True), num)
|
self.assertEqual(psutil.cpu_count(logical=True), num)
|
||||||
|
|
||||||
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
@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")
|
out = sh("lscpu -p")
|
||||||
num = len([x for x in out.split('\n') if not x.startswith('#')])
|
num = len([x for x in out.split('\n') if not x.startswith('#')])
|
||||||
self.assertEqual(psutil.cpu_count(logical=True), num)
|
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):
|
class TestSystemCPUCountPhysical(PsutilTestCase):
|
||||||
|
|
||||||
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
@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")
|
out = sh("lscpu -p")
|
||||||
core_ids = set()
|
core_ids = set()
|
||||||
for line in out.split('\n'):
|
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")
|
@unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available")
|
||||||
@skip_on_not_implemented()
|
@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()
|
# test psutil.disk_usage() and psutil.disk_partitions()
|
||||||
# against "df -a"
|
# against "df -a"
|
||||||
def df(path):
|
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.read_count, 1)
|
||||||
self.assertEqual(ret.write_count, 5)
|
self.assertEqual(ret.write_count, 5)
|
||||||
|
|
||||||
@ -82,10 +60,10 @@ Index: psutil-5.7.2/psutil/tests/test_linux.py
|
|||||||
def exists(path):
|
def exists(path):
|
||||||
if path == '/proc/diskstats':
|
if path == '/proc/diskstats':
|
||||||
return False
|
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.3.orig/psutil/tests/test_posix.py
|
||||||
+++ psutil-5.7.2/psutil/tests/test_posix.py
|
+++ psutil-5.7.3/psutil/tests/test_posix.py
|
||||||
@@ -371,7 +371,7 @@ class TestSystemAPIs(PsutilTestCase):
|
@@ -371,7 +371,7 @@ class TestSystemAPIs(PsutilTestCase):
|
||||||
|
|
||||||
# AIX can return '-' in df output instead of numbers, e.g. for /proc
|
# 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):
|
def df(device):
|
||||||
out = sh("df -k %s" % device).strip()
|
out = sh("df -k %s" % device).strip()
|
||||||
line = out.split('\n')[1]
|
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.3.orig/psutil/tests/test_system.py
|
||||||
+++ psutil-5.7.2/psutil/tests/test_system.py
|
+++ psutil-5.7.3/psutil/tests/test_system.py
|
||||||
@@ -589,7 +589,7 @@ class TestDiskAPIs(PsutilTestCase):
|
@@ -591,7 +591,7 @@ class TestDiskAPIs(PsutilTestCase):
|
||||||
def test_disk_usage_bytes(self):
|
def test_disk_usage_bytes(self):
|
||||||
psutil.disk_usage(b'.')
|
psutil.disk_usage(b'.')
|
||||||
|
|
||||||
|
@ -1,24 +1,17 @@
|
|||||||
--- a/psutil/tests/test_linux.py
|
Index: psutil-5.7.3/psutil/tests/test_linux.py
|
||||||
+++ b/psutil/tests/test_linux.py
|
===================================================================
|
||||||
@@ -1500,6 +1500,8 @@ class TestSensorsBattery(unittest.TestCa
|
--- 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)
|
self.assertIsNone(psutil.sensors_battery().power_plugged)
|
||||||
assert m.called
|
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'),
|
+ @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_full'),
|
||||||
+ 'Missing /sys/class/power_supply/BAT0/energy_full file.')
|
+ 'Missing /sys/class/power_supply/BAT0/energy_full file.')
|
||||||
def test_emulate_energy_full_0(self):
|
def test_emulate_energy_full_0(self):
|
||||||
# Emulate a case where energy_full files returns 0.
|
# Emulate a case where energy_full files returns 0.
|
||||||
with mock_open_content(
|
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)
|
self.assertEqual(psutil.sensors_battery().percent, 0)
|
||||||
assert m.called
|
assert m.called
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user