lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250211075943.7aa74ff1@foz.lan>
Date: Tue, 11 Feb 2025 07:59:43 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jonathan Corbet <corbet@....net>, Linux Doc Mailing List
 <linux-doc@...r.kernel.org>, "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

Em Thu, 30 Jan 2025 09:00:26 +0200
Adrian Hunter <adrian.hunter@...el.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@...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.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ