Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1983379imu; Thu, 24 Jan 2019 05:26:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN7FWmphqXf7x33jh+/RXjuvlb/KJK2Rp17/7SNhhZ+CmdSuwIMk/8ziX7ujrEWiHXcpdD8a X-Received: by 2002:a17:902:8f83:: with SMTP id z3mr6400577plo.328.1548336388409; Thu, 24 Jan 2019 05:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548336388; cv=none; d=google.com; s=arc-20160816; b=JD2JTcz2a8Et5pRkTbbmpeV2MAnKp1rVV4f2eP7Yp2pRe96dVhfs9Vn9rurJf4keiv B4f5DFwq8LWFNPHtoOQxafmXuumte2iDK+y9Tqq0O8TyZGPSWqGacud7Tafmd45nWO+T Ph/FEo3YS0jppKPn+nRXoHvAiR7k/6mrZ47T61B/B5MLutpN3sh5oUyZT7kuCwjwAk5h S320KShMRXZmTEL/FKl7ix1UXz+ZhK/iehgkNLH4P2nCh9SVqpj6sLKZ+WwOZI0uv5ub t6cMOw/9ghkgzet1fT5FX3jm9RlROjj3sKchl+8C/UKKQ969pI7LYjjy//lEKByM6m9A E8Xg== 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:dkim-signature; bh=UcOsrsT6Iq3+Ykg7XNTzWCwAGkK7VkUtv33VLqyRCGk=; b=VdKP3ubN7HxyINF3QjqDXiqjgNKw1GoNtmEAWsV9svxDLGwiL5CXdeK1D0ZGaoyBHg UMzcOvf/wQWoQ5GpLYP6RHM2WQ0K8YwTbZow1JB9Rr8hnLXKfM8RYVfKiIFJ1DJ7aORk DWJQL+pFWgvAj45/5sgOaujFwI56B2ZdU0kqjD3VGxRvM57mrZFas/5EuiauRaqQXAXq WefEEMaBIp+oJ59LU7FQdcR5AhJyJN2Zg+EMxmgW59K4pG7GlOytrdJZAOMsoJ66mhfj /P5NfYI5L//QhVQ/hojpuDv9piimXkbLCXIEUzAfZmfDEFANPvxb8Xt9aHaXlnPcbHkj 9Y5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k1I9SEfW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s123si22448509pfb.274.2019.01.24.05.26.13; Thu, 24 Jan 2019 05:26:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=k1I9SEfW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbfAXN0H (ORCPT + 99 others); Thu, 24 Jan 2019 08:26:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:51756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbfAXN0H (ORCPT ); Thu, 24 Jan 2019 08:26:07 -0500 Received: from quaco.ghostprotocols.net (ovpn-brq.redhat.com [213.175.37.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B8F621855; Thu, 24 Jan 2019 13:26:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548336366; bh=TbEKS4grrYv8aGXZIGGlSPe47UG4tcuYxSWh9Zjj14k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k1I9SEfWwXjq9dvU0r3KcKMczNcQNlBnz59410pyaTYcvuQtU21NloknUbcGGDCDB ssp9nhancxQ2dxjNP27P+jdU6I4eSVnDVutu7NteF7vtC2tB+HYIhYfFUgjmOX6dag MJmNVrPfBQh+uaWjq/ig2ATbvDzSmVd9wMFNkgv0= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 78C124034F; Thu, 24 Jan 2019 14:26:04 +0100 (CET) Date: Thu, 24 Jan 2019 14:26:04 +0100 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Tony Jones , linux-kernel@vger.kernel.org, Seeteena Thoufeek , Ravi Bangoria , Jiri Olsa , Jonathan Corbet , linux-perf-users@vger.kernel.org Subject: Re: [PATCH 0/6] Fix issues with Python3 scripting Message-ID: <20190124132604.GB30768@kernel.org> References: <20190124005229.16146-1-tonyj@suse.de> <20190124103922.GB13852@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190124103922.GB13852@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jan 24, 2019 at 11:39:22AM +0100, Jiri Olsa escreveu: > 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, tested and applied. - Arnaldo