[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef4110a1-d76b-4d01-bbed-734e7ba13ef5@intel.com>
Date: Thu, 30 Jan 2025 09:00:26 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Jonathan Corbet
<corbet@....net>, Linux Doc Mailing List <linux-doc@...r.kernel.org>
CC: "Liang, Kan" <kan.liang@...ux.intel.com>, Alexander Shishkin
<alexander.shishkin@...ux.intel.com>, Ian Rogers <irogers@...gle.com>, "Ingo
Molnar" <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>, "Peter
Zijlstra" <peterz@...radead.org>, <linux-kernel@...r.kernel.org>,
<linux-perf-users@...r.kernel.org>
Subject: Re: [PATCH 3/6] tools: perf: tools: perf: exported-sql-viewer: drop
support for Python 2
On 29/01/25 19:39, Mauro Carvalho Chehab wrote:
> 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/exported-sql-viewer.py | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
> index 121cf61ba1b3..b096592fd35f 100755
> --- a/tools/perf/scripts/python/exported-sql-viewer.py
> +++ b/tools/perf/scripts/python/exported-sql-viewer.py
> @@ -3939,9 +3939,8 @@ def CopyTreeCellsToClipboard(view, as_csv=False, with_hdr=False):
> indent_str = " " * indent_sz
>
> expanded_mark_sz = 2
> - if sys.version_info[0] == 3:
> - expanded_mark = "\u25BC "
> - not_expanded_mark = "\u25B6 "
> + expanded_mark = "\u25BC "
> + not_expanded_mark = "\u25B6 "
You removed the 'if' but left the 'else'.
The white is messed up.
So presumably not tested at all:
python3 tools/perf/scripts/python/exported-sql-viewer.py
File "/home/user/git/review2/tools/perf/scripts/python/exported-sql-viewer.py", line 3942
expanded_mark = "\u25BC "
^
IndentationError: unindent does not match any outer indentation level
Posting untested patches, especially tidy-ups,
should really be discouraged.
There are many other obvious python2 things in this
file that have not been addressed. When asked, AI
listed 10 things.
> else:
> expanded_mark = unicode(chr(0xE2) + chr(0x96) + chr(0xBC) + " ", "utf-8")
> not_expanded_mark = unicode(chr(0xE2) + chr(0x96) + chr(0xB6) + " ", "utf-8")
Powered by blists - more mailing lists