From 7bf69d7beea6cf532d402d9abf4ac2edde6c35d2 Mon Sep 17 00:00:00 2001 From: Matthew Edmonds Date: Mon, 10 Dec 2018 18:02:49 -0500 Subject: [PATCH] More py3.x support The Stein supported runtimes proposal [1] has chosen py36 over py35 due to the communities move to testing on Ubuntu 18.04, where py36 is the default runtime. We update tox.ini and setup.cfg accordingly. We also add a py37 option to the tox.ini to facilitate future-looking tests per the resolution on keeping up with Python 3 releases [2]. The py35 option will eventually need to be removed from tox.ini, but this keeps it for now in order to allow time for folks to transition. As previously commented, automatic tox envs (pyXX) will use the python version appropriate to that env and ignore basepython inherited from [testenv], so we no longer specify a basepython explicitly for these. [1] https://review.openstack.org/611080 [2] https://review.openstack.org/613145 Change-Id: Ia7bc930de383d8522509488194e93e711f51590f --- setup.cfg | 2 +- tox.ini | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1f3ce0f..8847bee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ classifier = Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 [entry_points] ceilometer.compute.virt = diff --git a/tox.ini b/tox.ini index 4b6cb8f..fe36b12 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.1.1 skipsdist = True -envlist = py35,py27,pep8 +envlist = py36,py27,pep8 # Automatic envs (pyXX) will use the python version appropriate to that # env and ignore basepython inherited from [testenv]. That's what we # want, and we don't need to be warned about it. @@ -31,14 +31,24 @@ commands = find . -type f -name "*.pyc" -delete [testenv:py27] -basepython = python2.7 commands = {[testenv]commands} stestr run {posargs} stestr slowest [testenv:py35] -basepython = python3.5 +commands = + {[testenv]commands} + stestr run {posargs} + stestr slowest + +[testenv:py36] +commands = + {[testenv]commands} + stestr run {posargs} + stestr slowest + +[testenv:py37] commands = {[testenv]commands} stestr run {posargs}