Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1829401imu; Thu, 24 Jan 2019 02:39:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN5bDzI9fNTYvg6wg/ns3GIYR30bqxDoC1c3VrPyYFIZomf/Qs1k3FHZFDlzWgsqa7IN2peo X-Received: by 2002:a63:e40c:: with SMTP id a12mr5499982pgi.28.1548326395458; Thu, 24 Jan 2019 02:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548326395; cv=none; d=google.com; s=arc-20160816; b=NeLVNFWPX6M8wYUKViCqaM5Qi4tD0zwUPnsEmLj4ykd1Huw1yxHzeOufWZQh7NQsPY cVSF/aagotdYCTohlax1Z9Je+LIThcws2yx0AQru6BgCaPsmNRwxT/nGcC1iB5z55TWq aNsg33GtgYocj8HQsEPZO752wfHpydRlF27X/7xvSXv/A6+awoQMEd0r1yaZsSbONYL7 8PxCeNEL/9LSkVF6/7m17YXSqOFaPtVHno9uNVN6J/rtp2zM9jDE6k5sVchr/t04oUyc I467tFX28lhqLfeCrt/bMmYKwXKK8ReOQudSEAZYXag204sgUn4R/woIlHwAGQ8OwGEu CrcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xTm2j7ub/DQLVO4qRbs0Y+LwFM4+YcvOzRLIOWE/l68=; b=gF4waOq2dPuohSz6JCDzcpXosznD+PAdQec524Egb7NYu6+mqLySfCx0MTeFLEnV/m anE3z3/dGPqsKYEfTVcmerM46IbYlrRP+wJcHz7guYHhHszzRs06eqdg0tZZ6F9bj/wR o08W2Zn2lKl2/WTZI3QRSzAc5bD/GINy1gKzo0RvU+7pIzAIJmUGRS1thx6GMOWzLFJY u6lcQmJ5ZLbUdWgpsqPq1cnGs74QlJzlI8FqH2yeLVBUlR/gh/b/6OrcQ9eSMox3pKZp IC29UhBseuzjUcNUP4sZpiZmcB3umE2GNC5G8MdSKKXZtUwNLWvwjng4cSRZxRifx8HZ i9Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si20352884pfm.39.2019.01.24.02.39.40; Thu, 24 Jan 2019 02:39:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727405AbfAXKjZ (ORCPT + 99 others); Thu, 24 Jan 2019 05:39:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35622 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbfAXKjZ (ORCPT ); Thu, 24 Jan 2019 05:39:25 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04F0112E3; Thu, 24 Jan 2019 10:39:25 +0000 (UTC) Received: from krava (ovpn-204-178.brq.redhat.com [10.40.204.178]) by smtp.corp.redhat.com (Postfix) with SMTP id F363B6B8FB; Thu, 24 Jan 2019 10:39:22 +0000 (UTC) Date: Thu, 24 Jan 2019 11:39:22 +0100 From: Jiri Olsa To: Tony Jones Cc: linux-kernel@vger.kernel.org, Seeteena Thoufeek , Ravi Bangoria , Arnaldo Carvalho de Melo , Jiri Olsa , Jonathan Corbet , linux-perf-users@vger.kernel.org Subject: Re: [PATCH 0/6] Fix issues with Python3 scripting Message-ID: <20190124103922.GB13852@krava> References: <20190124005229.16146-1-tonyj@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190124005229.16146-1-tonyj@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 24 Jan 2019 10:39:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 23, 2019 at 04:52:23PM -0800, Tony Jones wrote: > 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 please try latest code from Arnaldo, we just had fix in that area > 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 Acked-by: Jiri Olsa thanks, jirka