[openstack-dev] [python3] tempest and grenade conversion to python 3.6

Clark Boylan cboylan at sapwetik.org
Tue Sep 18 16:53:45 UTC 2018


On Tue, Sep 18, 2018, at 9:46 AM, Nate Johnston wrote:
> Hello python 3.6 champions,
> 
> I have looked around a little, and I don't see a method for me to
> specifically select the version of python that the tempest and grenade
> jobs for my project (neutron) are using.  I assume one of four things
> is at play here:
> 
> A. These projects already shifted to python 3 and I don't have to worry
> about it
> 
> B. There is a toggle for the python version I just have not seen yet
> 
> C. These projects are still on python 2 and need help to do a conversion
> to python 3, which would affect all customers
> 
> D. Something else that I have failed to imagine
> 
> Could you elaborate which of these options properly reflects the state
> of affairs?  If the answer is "C" then perhaps we can start a discussion
> on that migration.

For our devstack and grenade jobs tempest is installed using tox [0]. And since the full testenv in tempest's tox.ini doesn't specify a python version [1] I expect that it will attempt a python2 virtualenv on every platform (Arch linux may be an exception but we don't test that).

I think that means C is the situation here. To change that you can set basepython to python3 (see [2] for an example) which will run tempest under whichever python3 is present on the system. The one gotcha for this is that it will break tempest on centos which does not have python3. Maybe the thing to do there is add a full-python2 testenv that centos can run?

[0] https://git.openstack.org/cgit/openstack-dev/devstack/tree/lib/tempest#n653
[1] https://git.openstack.org/cgit/openstack/tempest/tree/tox.ini#n74
[2] https://git.openstack.org/cgit/openstack-infra/zuul/tree/tox.ini#n7

Hope this helps,
Clark



More information about the OpenStack-dev mailing list