[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54d6cc84b9b8408b7857fb2a5d72994cd5acf196.1738171937.git.mchehab+huawei@kernel.org>
Date: Wed, 29 Jan 2025 18:39:06 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Jonathan Corbet <corbet@....net>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Arnaldo Carvalho de Melo <mchehab+huawei@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Jiri Olsa <mchehab+huawei@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <mchehab+huawei@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Subject: [PATCH 4/6] tools: perf: task-analyzer: drop support for Python 2
As stated at process/changes.rsy doc, the current minimal Python
version is 3.x, so drop support for EOL python 2.x.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
tools/perf/scripts/python/task-analyzer.py | 23 +++++-----------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/tools/perf/scripts/python/task-analyzer.py b/tools/perf/scripts/python/task-analyzer.py
index 3f1df9894246..9dc18875630c 100755
--- a/tools/perf/scripts/python/task-analyzer.py
+++ b/tools/perf/scripts/python/task-analyzer.py
@@ -50,25 +50,12 @@ LEN_IN_IN = len("99999999999.999") # 15
LEN_IN_OUT = len("99999999999.999") # 15
-# py2/py3 compatibility layer, see PEP469
-try:
- dict.iteritems
-except AttributeError:
- # py3
- def itervalues(d):
- return iter(d.values())
-
- def iteritems(d):
- return iter(d.items())
-
-else:
- # py2
- def itervalues(d):
- return d.itervalues()
-
- def iteritems(d):
- return d.iteritems()
+# py3
+def itervalues(d):
+ return iter(d.values())
+def iteritems(d):
+ return iter(d.items())
def _check_color():
global _COLORS
--
2.48.1
Powered by blists - more mailing lists