Skip to content

Commit

Permalink
Update python-psutil to version 5.9.0 / rev 64 via SR 950795
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/950795
by user mcepl + dimstar_suse
- Fix name of Patch4, it is skip-partitions-erros.patch
- Add skip-partitions-erros.patch skipping tests failing on Linux
  (gh#giampaolo/psutil#2043).
  • Loading branch information
mcepl authored and bmwiedemann committed Feb 3, 2022
1 parent 9d9c6b0 commit 8063c42
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 12 deletions.
Binary file modified packages/p/python-psutil/.files
Binary file not shown.
11 changes: 11 additions & 0 deletions packages/p/python-psutil/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -626,4 +626,15 @@ It does not make sense to double the whole HISTORY of upstream source in .change
9 CPUs.</comment>
<requestid>945437</requestid>
</revision>
<revision rev="64" vrev="2">
<srcmd5>993f5b6741bd4c9f8a68820bf098ada8</srcmd5>
<version>5.9.0</version>
<time>1643926556</time>
<user>dimstar_suse</user>
<comment>- Fix name of Patch4, it is skip-partitions-erros.patch
- Add skip-partitions-erros.patch skipping tests failing on Linux
(gh#giampaolo/psutil#2043).
</comment>
<requestid>950795</requestid>
</revision>
</revisionlist>
11 changes: 11 additions & 0 deletions packages/p/python-psutil/python-psutil.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Feb 2 17:30:32 UTC 2022 - Matej Cepl <mcepl@suse.com>

- Fix name of Patch4, it is skip-partitions-erros.patch

-------------------------------------------------------------------
Sun Jan 30 01:38:45 UTC 2022 - Matej Cepl <mcepl@suse.com>

- Add skip-partitions-erros.patch skipping tests failing on Linux
(gh#giampaolo/psutil#2043).

-------------------------------------------------------------------
Mon Jan 10 22:51:40 UTC 2022 - Dirk Müller <dmueller@suse.com>

Expand Down
6 changes: 5 additions & 1 deletion packages/p/python-psutil/python-psutil.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Patch1: skip-obs.patch
Patch2: skip_failing_tests.patch
# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa@suse.com
Patch3: skip_rlimit_tests_on_python2.patch
# PATCH-FIX-UPSTREAM skip-partitions-erros.patch gh#giampaolo/psutil#2043 mcepl@suse.com
Patch4: skip-partitions-erros.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
Expand Down Expand Up @@ -89,7 +91,9 @@ export TRAVIS=1
march=`python3 -c "import platform ; print(platform.machine())"`

# Note test_fetch_all is a bit flaky, occasionally failing
%python_expand PYTHONPATH=build/lib.linux-${march}-%{$python_version}/ $python -Wa psutil/tests/runner.py
%{python_expand export PYTHONPATH=build/lib.linux-${march}-%{$python_version}/
$python -Wa psutil/tests/runner.py
}
%endif

%files %{python_files}
Expand Down
33 changes: 33 additions & 0 deletions packages/p/python-psutil/skip-partitions-erros.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
psutil/tests/test_linux.py | 2 ++
psutil/tests/test_misc.py | 1 +
2 files changed, 3 insertions(+)

--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -1288,6 +1288,7 @@ class TestRootFsDeviceFinder(PsutilTestC
self.assertRaises(FileNotFoundError, finder.ask_sys_dev_block)
finder.ask_sys_class_block()

+ @unittest.skip("Test doesn't work on Linux.")
@unittest.skipIf(GITHUB_ACTIONS, "unsupported on GITHUB_ACTIONS")
def test_comparisons(self):
finder = RootFsDeviceFinder()
@@ -1316,6 +1317,7 @@ class TestRootFsDeviceFinder(PsutilTestC
findmnt_value = sh("findmnt -o SOURCE -rn /")
self.assertEqual(psutil_value, findmnt_value)

+ @unittest.skip("Test doesn't work on Linux.")
def test_disk_partitions_mocked(self):
with mock.patch(
'psutil._pslinux.cext.disk_partitions',
--- a/psutil/tests/test_misc.py
+++ b/psutil/tests/test_misc.py
@@ -402,6 +402,7 @@ class TestMisc(PsutilTestCase):
reload_module(psutil)
self.assertIn("version conflict", str(cm.exception).lower())

+ @unittest.skip("Test doesn't work on Linux.")
def test_debug(self):
if PY3:
from io import StringIO
14 changes: 8 additions & 6 deletions packages/p/python-psutil/skip_failing_tests.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
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)
---
psutil/tests/test_linux.py | 4 ++++
1 file changed, 4 insertions(+)

--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -1614,6 +1614,8 @@ class TestSensorsBattery(PsutilTestCase)
self.assertIsNone(psutil.sensors_battery().power_plugged)
assert m.called

Expand All @@ -11,7 +13,7 @@ Index: psutil-5.7.3/psutil/tests/test_linux.py
def test_emulate_energy_full_0(self):
# Emulate a case where energy_full files returns 0.
with mock_open_content(
@@ -1571,6 +1573,8 @@ class TestSensorsBattery(PsutilTestCase)
@@ -1621,6 +1623,8 @@ class TestSensorsBattery(PsutilTestCase)
self.assertEqual(psutil.sensors_battery().percent, 0)
assert m.called

Expand Down
12 changes: 7 additions & 5 deletions packages/p/python-psutil/skip_rlimit_tests_on_python2.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Index: psutil-5.8.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
---
psutil/tests/test_process.py | 6 ++++++
1 file changed, 6 insertions(+)

--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -416,6 +416,7 @@ class TestProcess(PsutilTestCase):
p.ionice(init)

Expand Down Expand Up @@ -42,7 +44,7 @@ Index: psutil-5.8.0/psutil/tests/test_process.py
def test_rlimit_infinity_value(self):
# RLIMIT_FSIZE should be RLIM_INFINITY, which will be a really
# big number on a platform with large file support. On these
@@ -1270,6 +1275,7 @@ class TestProcess(PsutilTestCase):
@@ -1276,6 +1281,7 @@ class TestProcess(PsutilTestCase):
self.assertEqual(normcase(p.exe()), normcase(PYTHON_EXE))

@unittest.skipIf(not POSIX, 'POSIX only')
Expand Down

0 comments on commit 8063c42

Please sign in to comment.