linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix issues with Python3 scripting
@ 2019-01-24  0:52 Tony Jones
  2019-01-24  0:52 ` [PATCH 1/6] perf script python: Add trace_context extension module to sys,modules Tony Jones
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Tony Jones @ 2019-01-24  0:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Seeteena Thoufeek, Ravi Bangoria, Arnaldo Carvalho de Melo,
	Jiri Olsa, Jonathan Corbet, linux-perf-users, Tony Jones

Seeteena posted, earlier this week, some patches to add Python3 support
to scripts/python/*.py.  Unfortunately there were some issues with these
patches (such as: https://lkml.org/lkml/2019/1/17/351)

Since I already had a tested set of patches in openSUSE:Factory and 
SLE15-SP1 and was about to submit them, Seeteena and I that agreed I 
should post my patches not involving scripts/python/*.py and Seeteena 
will later resubmit the patches for scripts/python/*.py incorporating 
my review feedback under a joint signed-off-by.

It should be noted that the use of "from __future__ import print_function" 
(see: https://lkml.org/lkml/2019/1/16/641) and "except as" (see change to:
tests/attr.py) implies Python2 >= 2.6 as the necessary support has not 
been backported to prior versions.  I am not sure if it's worth detecting 
<2.6 at build time or whether it's sufficiently old as to be a non-issue?

The shebang changes were driven mostly by our build process as it scans
all files within an rpm and the shebangs would result in a rpm requires
on the python2 binary when BuildRequires was python3-devel. I think they 
make sense to apply upstream but understand totally if it's prefered we 
keep them local.

These changes have been tested with PYTHON=python2 (v2.7) and 
PYTHON=python3 (v3.6) on latest openSUSE Tumbleweed.  I did notice that 
test #18 "'import perf' in python" is failing on my system without these 
changes. I'll look at it further but didn't want to hold up Seeteena's 
resubmit.

Tony Jones (6):
  perf script python: Add trace_context extension module to sys,modules
  perf script python: Use PyBytes for attr in trace-event-python
  perf script python: remove explicit shebang from setup.py
  perf script python: remove explicit shebang from tests/attr.c
  perf script python: remove explicit shebang from Python scripts
  perf script python: add Python3 support to tests/attr.py

 tools/perf/Makefile.perf                      |  4 +--
 .../scripts/python/exported-sql-viewer.py     |  1 -
 tools/perf/scripts/python/sched-migration.py  |  2 --
 tools/perf/scripts/python/stat-cpi.py         |  1 -
 tools/perf/tests/attr.py                      | 33 +++++++++++--------
 .../scripting-engines/trace-event-python.c    |  9 ++---
 tools/perf/util/setup.py                      |  2 --
 7 files changed, 26 insertions(+), 26 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-02-09 12:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24  0:52 [PATCH 0/6] Fix issues with Python3 scripting Tony Jones
2019-01-24  0:52 ` [PATCH 1/6] perf script python: Add trace_context extension module to sys,modules Tony Jones
2019-01-26 10:06   ` [tip:perf/core] perf script python: Add trace_context extension module to sys.modules tip-bot for Tony Jones
2019-01-24  0:52 ` [PATCH 2/6] perf script python: Use PyBytes for attr in trace-event-python Tony Jones
2019-01-26 10:07   ` [tip:perf/core] " tip-bot for Tony Jones
2019-01-24  0:52 ` [PATCH 3/6] perf script python: remove explicit shebang from setup.py Tony Jones
2019-01-26 10:07   ` [tip:perf/core] perf script python: Remove " tip-bot for Tony Jones
2019-01-24  0:52 ` [PATCH 4/6] perf script python: remove explicit shebang from tests/attr.c Tony Jones
2019-01-26 10:08   ` [tip:perf/core] perf script python: Remove " tip-bot for Tony Jones
2019-01-24  0:52 ` [PATCH 5/6] perf script python: remove explicit shebang from Python scripts Tony Jones
2019-01-26 10:09   ` [tip:perf/core] perf script python: Remove " tip-bot for Tony Jones
2019-01-24  0:52 ` [PATCH 6/6] perf script python: add Python3 support to tests/attr.py Tony Jones
2019-01-26 10:09   ` [tip:perf/core] perf script python: Add " tip-bot for Tony Jones
2019-02-09 12:24   ` [tip:perf/urgent] " tip-bot for Tony Jones
2019-01-24 10:39 ` [PATCH 0/6] Fix issues with Python3 scripting Jiri Olsa
2019-01-24 13:26   ` Arnaldo Carvalho de Melo
2019-01-25 12:31 ` Arnaldo Carvalho de Melo
2019-01-25 13:57   ` Arnaldo Carvalho de Melo
2019-01-25 18:09     ` Tony Jones

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