From dfd24fc3a44b6d2176e1688d54c17d673a4f2373 Mon Sep 17 00:00:00 2001 From: zhang-liang-pengkun Date: Fri, 12 Jan 2024 17:51:41 +0800 Subject: [PATCH] 1216 - give credit to @hexaclock Signed-off-by: zhang-liang-pengkun --- 0004-1216-give-credit-to-hexaclock.patch | 44 +++++++++++++++++++ ...compatibility-with-python-2.6.x-1216.patch | 25 +++++++++++ python-psutil.spec | 6 ++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 0004-1216-give-credit-to-hexaclock.patch create mode 100644 0004-fix-compatibility-with-python-2.6.x-1216.patch diff --git a/0004-1216-give-credit-to-hexaclock.patch b/0004-1216-give-credit-to-hexaclock.patch new file mode 100644 index 0000000..c616ccc --- /dev/null +++ b/0004-1216-give-credit-to-hexaclock.patch @@ -0,0 +1,44 @@ +From 62e1783764420f36cd270135decb00b324add7fe Mon Sep 17 00:00:00 2001 +From: Giampaolo Rodola +Date: Tue, 13 Feb 2018 00:31:59 +0100 +Subject: [PATCH] #1216 - give credit to @hexaclock + +--- + CREDITS | 4 ++++ + HISTORY.rst | 9 +++++++++ + 2 files changed, 13 insertions(+) + +diff --git a/CREDITS b/CREDITS +index cf9ce493..798b36e3 100644 +--- a/CREDITS ++++ b/CREDITS +@@ -515,3 +515,7 @@ I: 1167 + N: janderbrain + W: https://github.com/janderbrain + I: 1169 ++ ++N: Dan Vinakovsky ++W: https://github.com/hexaclock ++I: 1216 +diff --git a/HISTORY.rst b/HISTORY.rst +index dd813c5b..463860c2 100644 +--- a/HISTORY.rst ++++ b/HISTORY.rst +@@ -1,5 +1,14 @@ + *Bug tracker at https://github.com/giampaolo/psutil/issues* + ++5.4.4 ++===== ++ ++XXXX-XX-XX ++ ++**Bug fixes** ++ ++- 1216_: fix compatibility with python 2.6 on Windows (patch by Dan Vinakovsky) ++ + 5.4.3 + ===== + +-- +2.39.0.windows.2 + diff --git a/0004-fix-compatibility-with-python-2.6.x-1216.patch b/0004-fix-compatibility-with-python-2.6.x-1216.patch new file mode 100644 index 0000000..d399974 --- /dev/null +++ b/0004-fix-compatibility-with-python-2.6.x-1216.patch @@ -0,0 +1,25 @@ +From 7618de9683684811402f50b08ca3f3e979774e72 Mon Sep 17 00:00:00 2001 +From: Dan Vinakovsky +Date: Mon, 12 Feb 2018 18:29:34 -0500 +Subject: [PATCH] fix compatibility with python 2.6.x (#1216) + +--- + psutil/_pswindows.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py +index b6c58c93..0eb4b14f 100644 +--- a/psutil/_pswindows.py ++++ b/psutil/_pswindows.py +@@ -200,7 +200,7 @@ def py2_strencode(s): + if isinstance(s, str): + return s + else: +- return s.encode(ENCODING, errors=ENCODING_ERRS) ++ return s.encode(ENCODING, ENCODING_ERRS) + + + # ===================================================================== +-- +2.39.0.windows.2 + diff --git a/python-psutil.spec b/python-psutil.spec index 2106aad..f620229 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -1,6 +1,6 @@ Name: python-psutil Version: 5.4.3 -Release: 12 +Release: 13 Summary: A library for retrieving information on running processes and system utilization in Python License: BSD URL: https://github.com/giampaolo/psutil @@ -11,6 +11,7 @@ Patch0002: CVE-2019-18874-2.patch Patch0003: 0001-Fix-1354-Linux-disk_io_counters-fails-on-Linux-kerne.patch Patch0004: 0002-Pass-python_requires-argument-to-setuptools-1208.patch Patch0005: 0003-fix-compatibility-with-python-2.6.x-1216.patch +Patch0006: 0004-1216-give-credit-to-hexaclock.patch BuildRequires: gcc python2-devel python3-devel procps-ng python2-mock python3-mock python2-ipaddress @@ -74,6 +75,9 @@ done %{python3_sitearch}/*.egg-info %changelog +* Fri Jan 12 2024 zhangliangpengkun - 5.4.3-13 +- #1216 - give credit to @hexaclock + * Wed Dec 27 2023 zhangliangpengkun - 5.4.3-12 - fix compatibility with python 2.6.x -- Gitee