From: Adrian Hunter <adrian.hunter@intel.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: "Liang, Kan" <kan.liang@linux.intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ian Rogers <irogers@google.com>, "Ingo Molnar" <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
"Peter Zijlstra" <peterz@infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH 3/6] tools: perf: tools: perf: exported-sql-viewer: drop support for Python 2
Date: Thu, 30 Jan 2025 09:00:26 +0200 [thread overview]
Message-ID: <ef4110a1-d76b-4d01-bbed-734e7ba13ef5@intel.com> (raw)
In-Reply-To: <761ec2ebe518b5506e67d088797b559f89c396bb.1738171937.git.mchehab+huawei@kernel.org>
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@kernel.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")
next prev parent reply other threads:[~2025-01-30 7:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 17:39 [PATCH 0/6] Address some issues related to Python version Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 1/6] docs: trace: decode_msr.py: make it compatible with python 3 Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 2/6] tools: perf: exported-sql-viewer: drop support for Python 2 Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 3/6] tools: perf: " Mauro Carvalho Chehab
2025-01-30 7:00 ` Adrian Hunter [this message]
2025-02-11 6:59 ` Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 4/6] tools: perf: task-analyzer: " Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 5/6] tools: selftests/bpf: test_bpftool_synctypes: escape raw symbols Mauro Carvalho Chehab
2025-01-29 20:13 ` Quentin Monnet
2025-01-29 17:39 ` [PATCH 6/6] comedi: convert_csv_to_c.py: use r-string for a regex expression Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef4110a1-d76b-4d01-bbed-734e7ba13ef5@intel.com \
--to=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=corbet@lwn.net \
--cc=irogers@google.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab+huawei@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox