Installing python3.5 should be fine, but if you need to modify how the tox 
command is invoked then you need to change your maven pom file.

Can someone else chime in if you think this might cause conflicts with any 
existing python3 projects?

Thanks,
Gary

________________________________
From: Huang, Haibin <[email protected]>
Sent: Wednesday, July 17, 2019 11:54 PM
To: [email protected] <[email protected]>; Gary Wu 
<[email protected]>; Yang, Bin <[email protected]>
Subject: RE: [onap-discuss] Upgrade python version from 2 to 3


Hi Gary,



I have debugged and found root cause which is ubuntu1604 guest default install 
python2.7.

So,  we need make image including python3.5 environment. I think we have two 
methods to solve this problem.

First, we add the steps for installing change in [1].

  # apt-get install python3.5

  # apt-get install python3-pip

  # pip3 install virtualenv

  # python3 -m venv venv-tox

 Use “# virtualenv -p /usr/bin/python3.5 $WORKSPACE/venv-tox” to replace “# 
virtualenv $WORKSPACE/venv-tox”



Second, we make new image including python3.5, pip and virtualenv to replace 
ubuntu1604 image.

Anyway, we need your confirmation whether we modify it in that way.



[1] 
https://git.onap.org/ci-management/tree/jjb/global-templates-python.yaml<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.onap.org%2Fci-management%2Ftree%2Fjjb%2Fglobal-templates-python.yaml&data=02%7C01%7Cgary.wu%40futurewei.com%7C2c96ef97d90145e4b99e08d70b4cc699%7C0fee8ff2a3b240189c753a1d5591fedc%7C1%7C0%7C636990296695912257&sdata=2EiGA0EAdlHLNHmLQrp4PZH4iDsX8FnrtX3Zu2tN92s%3D&reserved=0>



From: [email protected] [mailto:[email protected]] On 
Behalf Of Gary Wu
Sent: Wednesday, July 17, 2019 12:25 PM
To: Huang, Haibin <[email protected]>; [email protected]; Yang, 
Bin <[email protected]>
Subject: Re: [onap-discuss] Upgrade python version from 2 to 3



Hi Haibin,



Probably the best way to solve this would be to verify that you can run "mvn 
clean install" for this project on a clean ubuntu 16.04 environment, and figure 
out exactly what apt-get packages are required to for everything to pass.  Then 
we can submit a LF request to ensure that the necessary packages are installed 
for the jenkins slave VMs that run these jobs.

Thanks,

Gary

________________________________

From: Huang, Haibin <[email protected]<mailto:[email protected]>>
Sent: Tuesday, July 16, 2019 5:28 PM
To: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>; Gary Wu 
<[email protected]<mailto:[email protected]>>; Yang, Bin 
<[email protected]<mailto:[email protected]>>
Subject: RE: [onap-discuss] Upgrade python version from 2 to 3



Hi Gary,



Actually, I had changed to py35 in the patch.

https://gerrit.onap.org/r/c/multicloud/openstack/+/91230/4/pike/tox.ini<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgerrit.onap.org%2Fr%2Fc%2Fmulticloud%2Fopenstack%2F%2B%2F91230%2F4%2Fpike%2Ftox.ini&data=02%7C01%7Cgary.wu%40futurewei.com%7C2c96ef97d90145e4b99e08d70b4cc699%7C0fee8ff2a3b240189c753a1d5591fedc%7C1%7C0%7C636990296695912257&sdata=sPsI8zwdu0y0qXzHBnsSmveiK10JUbG2yDKYHsbBqZE%3D&reserved=0>



From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Gary Wu
Sent: Wednesday, July 17, 2019 3:38 AM
To: Yang, Bin <[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>; Huang, Haibin 
<[email protected]<mailto:[email protected]>>
Subject: Re: [onap-discuss] Upgrade python version from 2 to 3



Hi Haibin,



I think you need to modify your tox.ini to specify the python environment that 
you need.  Currently it lists py27.  Maybe change that to py36 or whichever 
python3 version is appropriate for you?



Thanks,

Gary



________________________________

From: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>> on behalf of 
haibin via Lists.Onap.Org 
<[email protected]<mailto:[email protected]>>
Sent: Monday, July 15, 2019 11:18 PM
To: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>; Yang, Bin 
<[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>
Subject: [onap-discuss] Upgrade python version from 2 to 3



Hi Gray,



We must upgrading Django from version 1.9.6 to 2.2.3 because security issue [1].

Bin Yang passed on the message from the TSC meeting that we need to fix [1] in 
E release, otherwise we won’t be able to publish the Plugin.

The last version to support Python 2.7 is Django 1.11 LTS, so we must upgrade 
Python2 to Python3.



I change code and test successfully in local, but when I submitted the code and 
built by Gerrit Jenkins get error.

I checked log [2] and found the python version is python 2.7, how can I change 
the python version which is installed by Jenkins [1].

I also didn’t find “python-tools-install.sh”.



[1] 
https://jenkins.onap.org/job/multicloud-openstack-master-pike-verify-python/configure<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjenkins.onap.org%2Fjob%2Fmulticloud-openstack-master-pike-verify-python%2Fconfigure&data=02%7C01%7Cgary.wu%40futurewei.com%7C2c96ef97d90145e4b99e08d70b4cc699%7C0fee8ff2a3b240189c753a1d5591fedc%7C1%7C0%7C636990296695922254&sdata=kzOxNAhuAO%2Ffl6LnUJrvTVUq4G0DolD8GA2QRg%2Byh0A%3D&reserved=0>

[2] 
https://jenkins.onap.org/job/multicloud-openstack-master-pike-verify-python/138/console<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjenkins.onap.org%2Fjob%2Fmulticloud-openstack-master-pike-verify-python%2F138%2Fconsole&data=02%7C01%7Cgary.wu%40futurewei.com%7C2c96ef97d90145e4b99e08d70b4cc699%7C0fee8ff2a3b240189c753a1d5591fedc%7C1%7C0%7C636990296695932245&sdata=0uFZnWA1E84hMB3yfA9IyZBSfj8mmi140fKIAuiOU5w%3D&reserved=0>



Thank you!

Best Regards

-------------------------------------------------------------------------------------------------------------------------------

Huang.haibin

11628530

86+18106533356





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#18183): https://lists.onap.org/g/onap-discuss/message/18183
Mute This Topic: https://lists.onap.org/mt/32487216/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to