From patchwork Fri Dec 9 17:41:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John McNamara X-Patchwork-Id: 17826 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A42A6374F; Fri, 9 Dec 2016 18:41:38 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3E0782C2D for ; Fri, 9 Dec 2016 18:41:36 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 09 Dec 2016 09:41:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,324,1477983600"; d="scan'208"; a="1079795213" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga001.fm.intel.com with ESMTP; 09 Dec 2016 09:41:35 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.91]) by IRSMSX106.ger.corp.intel.com ([169.254.8.112]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 17:41:34 +0000 From: "Mcnamara, John" To: Neil Horman CC: "dev@dpdk.org" , "mkletzan@redhat.com" Thread-Topic: [dpdk-dev] [PATCH v1 0/4] app: make python apps python2/3 compliant Thread-Index: AQHSUWr2iWRdXGAWb0O4k8++TGfuS6D/vvyAgAATkgCAAAevAIAAB9AA Date: Fri, 9 Dec 2016 17:41:33 +0000 Message-ID: References: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com> <20161209152836.GA23061@hmsreliant.think-freely.org> <20161209170610.GB23061@hmsreliant.think-freely.org> In-Reply-To: <20161209170610.GB23061@hmsreliant.think-freely.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2Q5MjQ4MGYtNTNiNS00MWNmLThkNTAtMGQxZTgyMGJhOTE1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ilg2Q2JBREFOOWJaazJQNVBJTnRTTDlvYkxhQnYwbEJYbFI4aWhmenl5cEE9In0= x-originating-ip: [163.33.239.182] MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 0/4] app: make python apps python2/3 compliant X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Friday, December 9, 2016 5:06 PM > To: Mcnamara, John > Cc: dev@dpdk.org; mkletzan@redhat.com > Subject: Re: [dpdk-dev] [PATCH v1 0/4] app: make python apps python2/3 > compliant > > On Fri, Dec 09, 2016 at 05:00:19PM +0000, Mcnamara, John wrote: > > > > > > > -----Original Message----- > > > From: Neil Horman [mailto:nhorman@tuxdriver.com] > > > Sent: Friday, December 9, 2016 3:29 PM > > > To: Mcnamara, John > > > Cc: dev@dpdk.org; mkletzan@redhat.com > > > Subject: Re: [dpdk-dev] [PATCH v1 0/4] app: make python apps > > > python2/3 compliant > > > > > > On Thu, Dec 08, 2016 at 03:51:01PM +0000, John McNamara wrote: > > > > These patches refactor the DPDK Python applications to make them > > > > Python 2/3 compatible. > > > > > > > > In order to do this the patchset starts by making the apps PEP8 > > > > compliant in accordance with the DPDK Coding guidelines: > > > > > > > > > > > > http://dpdk.org/doc/guides/contributing/coding_style.html#python-c > > > > ode > > > > > > > > Implementing PEP8 and Python 2/3 compliance means that we can > > > > check all future Python patches for consistency. Python 2/3 > > > > support also makes downstream packaging easier as more distros > > > > move to Python 3 as > > > the system python. > > > > > > > > See the previous discussion about Python2/3 compatibilty here: > > > > > > > > http://dpdk.org/ml/archives/dev/2016-December/051683.html > > > > > > > > I've tested that the apps compile with python 2 and 3 and I've > > > > tested some of the apps for consistent output but it needs > additional testing. > > > > > > > > John McNamara (4): > > > > app: make python apps pep8 compliant > > > > app: make python apps python2/3 compliant > > > > app: give python apps a consistent shebang line > > > > doc: add required python versions to coding guidelines > > > > > > > ... > > > > And just to be clear, I don't think this patchset should be merged until > all of the apps have been functionally tested. I'll put something in the > final patchset to indicate that the modified apps have been tested. > > > I completely agree that the utilities should be functionally compatible > with python 3, but in regards to this patch set, all I'm really asking for > is that the changelog reflect that its just making stylistic changes to > comply with pep8 (i.e. not fixing python 2/3 compatibility issues). The > latter can be handled in subsequent patches piecemeal. > Hi Neil, Sorry if I'm missing something, but isn't that how the changelog is structured? From above: John McNamara (4): app: make python apps pep8 compliant app: make python apps python2/3 compliant app: give python apps a consistent shebang line doc: add required python versions to coding guidelines The PEP8 changes are made in 1/4. The Python 2/3 changes are made in 2/4. Also, the pmdinfo issue was easier to resolve than I feared. The following should fix the exception (on top of the other patches). I tested the output with a couple of pmds but maybe you could verify it as well. John $ git diff diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py index 097982e..d4e51aa 100755 --- a/tools/dpdk-pmdinfo.py +++ b/tools/dpdk-pmdinfo.py @@ -434,7 +434,7 @@ def process_dt_needed_entries(self): for tag in dynsec.iter_tags(): if tag.entry.d_tag == 'DT_NEEDED': - rc = tag.needed.find("librte_pmd") + rc = tag.needed.find(b"librte_pmd") if (rc != -1): library = search_file(tag.needed,