Hi, xiuqi
I am not sure that the flowing script work well in python3 system. The patch just explicitly remove the dependency on python2. If /usr/bin/python is linked to python2, they still work well. And I am sure that these scripts are currently unused, Currently they are just lying in the kernel source tree:)
-----Original Message----- From: Xiexiuqi Sent: Wednesday, September 2, 2020 10:22 PM To: Xiezhipeng (EulerOS) xiezhipeng1@huawei.com; kernel@openeuler.org Subject: Re: [PATCH v2] delete python2 dependency
Hi,
Does the flowing script work well in python3 system, if we use 'python' instead of 'python2'?
On 2020/9/2 22:10, Zhipeng Xie wrote:
hulk inclusion category: tools bugzilla: NA CVE: NA Link: https://gitee.com/src-openeuler/kernel/issues/I1SMDG
Python2 is no longer supported by the upstream community. The dependency on python2 should be removed from the kernel code.
Signed-off-by: Zhipeng Xie xiezhipeng1@huawei.com
tools/perf/scripts/python/call-graph-from-sql.py | 2 +- tools/perf/scripts/python/export-to-postgresql.py | 2 +- tools/power/pm-graph/bootgraph.py | 2 +- tools/power/pm-graph/sleepgraph.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/scripts/python/call-graph-from-sql.py b/tools/perf/scripts/python/call-graph-from-sql.py index b494a67a1c67..099b472df4a2 100644 --- a/tools/perf/scripts/python/call-graph-from-sql.py +++ b/tools/perf/scripts/python/call-graph-from-sql.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python # call-graph-from-sql.py: create call-graph from sql database # Copyright (c) 2014-2017, Intel Corporation. # diff --git a/tools/perf/scripts/python/export-to-postgresql.py b/tools/perf/scripts/python/export-to-postgresql.py index e46f51b17513..e97a03697aa2 100644 --- a/tools/perf/scripts/python/export-to-postgresql.py +++ b/tools/perf/scripts/python/export-to-postgresql.py @@ -171,7 +171,7 @@ import datetime # SELECT * FROM samples_view WHERE event = 'transactions'
AND branch_type_name = 'transaction abort';
# # To print a call stack requires walking the call_paths table. For example
this python script:
-# #!/usr/bin/python2 +# #!/usr/bin/python # # import sys # from PySide.QtSql import * diff --git a/tools/power/pm-graph/bootgraph.py b/tools/power/pm-graph/bootgraph.py index 8ee626c0f6a5..abb4c38f029b 100755 --- a/tools/power/pm-graph/bootgraph.py +++ b/tools/power/pm-graph/bootgraph.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python # # Tool for analyzing boot timing # Copyright (c) 2013, Intel Corporation. diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py index 0c760478f7d7..420102e2cd08 100755 --- a/tools/power/pm-graph/sleepgraph.py +++ b/tools/power/pm-graph/sleepgraph.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation.