From 03332aa4b07e61ba2d729605427fc2b6b34cc1e9 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Tue, 28 May 2019 13:45:13 +1000 Subject: [PATCH] Update tox.ini for correct py3 support and remove py2 When running 'tox' on a system where 'python3' is any version of python other that 3.5 tox will complain that the py35 testenv isn't py35 ... for example: [tony@thor election]$ tox -r /usr/lib/python3.7/site-packages/tox/config.py:570: UserWarning: conflicting basepython version (set 37, should be 35) for env 'py35';resolve conflict or set ignore_basepython_conflict proposed_version, implied_version, testenv_config.envname /usr/lib/python3.7/site-packages/tox/config.py:570: UserWarning: conflicting basepython version (set 37, should be 27) for env 'py27';resolve conflict or set ignore_basepython_conflict proposed_version, implied_version, testenv_config.envname docs recreate: /home/tony/tmp/election/.tox/docs ________________________________________________ summary _________________________________________________ docs: commands succeeded linters: commands succeeded py35: commands succeeded py27: commands succeeded congratulations :) [tony@thor election]$ for py in .tox/py*/bin/python ; do $py --version ; done Python 3.7.3 Python 3.7.3 As you can see the py35 and py27 interpreters are both in fact py37. Update tox.ini to that we can enforce python3 but still test on py35 and py37. While ther update the default envlist to remove py27 as that will always fail since I20184300f0a6cb6d230428cafc49f1b917376380 merged. As we're using ignore_basepython_conflict we need to set the tox minvcersion to 3.1.0 as that's the earliest version with that support Change-Id: Ia23682a285f6ee539dbeb9e1eb790cad8575da25 --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 97a12688..cec28c3b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = docs,linters,py35,py27 -minversion = 2.0 +envlist = docs,linters,py35,py37 +minversion = 3.1.0 skipsdist = True +ignore_basepython_conflict=true [testenv] basepython = python3