From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 00A8620F for ; Fri, 9 Dec 2016 18:00:23 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 09 Dec 2016 09:00:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,324,1477983600"; d="scan'208";a="40901707" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga006.fm.intel.com with ESMTP; 09 Dec 2016 09:00:20 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.91]) by IRSMSX104.ger.corp.intel.com ([169.254.5.52]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 17:00:20 +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/vvyAgAATkgA= Date: Fri, 9 Dec 2016 17:00:19 +0000 Message-ID: References: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com> <20161209152836.GA23061@hmsreliant.think-freely.org> In-Reply-To: <20161209152836.GA23061@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDZiMTY0YzMtNGE5Zi00NjM4LTg4YTUtNTQ1YzNjODdmMDEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjdHUnNDR2VZWEQzSThocmg3RTg2MFgzVVJib2FtbGI1clwvdG5qaHZoRlVBPSJ9 x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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: , X-List-Received-Date: Fri, 09 Dec 2016 17:00:24 -0000 > -----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 >=20 > 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-code > > > > 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 > > > > app/cmdline_test/cmdline_test.py | 87 ++- > > app/cmdline_test/cmdline_test_data.py | 403 +++++----- > > app/test/autotest.py | 46 +- > > app/test/autotest_data.py | 831 +++++++++++--= - > ------- > > app/test/autotest_runner.py | 740 +++++++++----= - > ---- > > app/test/autotest_test_funcs.py | 481 ++++++------ > > doc/guides/conf.py | 11 +- > > doc/guides/contributing/coding_style.rst | 3 +- > > examples/ip_pipeline/config/diagram-generator.py | 13 +- > > .../ip_pipeline/config/pipeline-to-core-mapping.py | 11 +- > > tools/cpu_layout.py | 79 +- > > tools/dpdk-devbind.py | 26 +- > > tools/dpdk-pmdinfo.py | 73 +- > > 13 files changed, 1410 insertions(+), 1394 deletions(-) > > > > -- > > 2.7.4 > > > I think the changelog is deceptive. It claims to make all the utilities > python2 and 3 compliant. But compliance with python3 is more than just > stylistic formatting. After this series several of these apps continue t= o > fail under python3. dpdk-pmdinfo as an example: >=20 > [nhorman@hmsreliant dpdk]$ ./tools/dpdk-pmdinfo.py ./build/app/testacl > Traceback (most recent call last): > File "./tools/dpdk-pmdinfo.py", line 607, in > main() > File "./tools/dpdk-pmdinfo.py", line 596, in main > readelf.process_dt_needed_entries() > File "./tools/dpdk-pmdinfo.py", line 437, in process_dt_needed_entries > rc =3D tag.needed.find("librte_pmd") > TypeError: a bytes-like object is required, not 'str' >=20 >=20 > I'm not saying its a bad patchset, but the changelog should reflect that > the change is purely stylistic, not functional. >=20 Hi Neil, Mea cupla. In my defense I did say in the cover letter that I'd tested that= the apps compiled but that they needed extra testing. I did functionally t= est some of the apps that I was more familiar with, but not all of them. In= particular the test apps need functional testing. However, the changes need to be functional rather than just cosmetic so I'l= l look into fixing pmdinfo with Python 3, unless you'd prefer to do that ;-= ). Since pmdinfo is dealing with binary data it may be tricky. That is ofte= n one of the real challenges of porting Python 2 code to Python 3. Hopefull= y elftools is compatible. Anyway I'll look into it. And just to be clear, I don't think this patchset should be merged until al= l of the apps have been functionally tested. I'll put something in the fina= l patchset to indicate that the modified apps have been tested. John