linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	"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: Tue, 11 Feb 2025 07:59:43 +0100	[thread overview]
Message-ID: <20250211075943.7aa74ff1@foz.lan> (raw)
In-Reply-To: <ef4110a1-d76b-4d01-bbed-734e7ba13ef5@intel.com>

Em Thu, 30 Jan 2025 09:00:26 +0200
Adrian Hunter <adrian.hunter@intel.com> escreveu:

> 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.

You're right. Btw my main goal was just to make vermin to detect the
minimal version of this script.

I tried to run this script on Fedora 41, installing PySide with
pip there (*):

	$ pip install --user PySide2
	...
	$ perf record  ls
	...
	$ perf script -s tools/perf/scripts/python/export-to-sqlite.py pt_example branches calls
	Segmentation fault (core dumped)


but it gives me segmentation fault on a required library:

	Program terminated with signal SIGSEGV, Segmentation fault.
	#0  0x00007fcab2e0d1ec in SbkObject_TypeF () from ~/.local/lib/python3.13/site-packages/shiboken2/libshiboken2.abi3.so.5.13

(*) Fedora 41 doesn't have pyside2 packages anymore. 

Thanks,
Mauro

  reply	other threads:[~2025-02-11  6:59 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
2025-02-11  6:59     ` Mauro Carvalho Chehab [this message]
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=20250211075943.7aa74ff1@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=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=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;
as well as URLs for NNTP newsgroup(s).