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
 <snip>
 ________________________________________________ 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
This commit is contained in:
Tony Breeds 2019-05-28 13:45:13 +10:00
parent 30ddc77e97
commit 03332aa4b0
1 changed files with 3 additions and 2 deletions

View File

@ -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