From 656e7ccb3cbf9eb4d56e1f8d561610bebbf44fd8 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 17:58:17 -0400 Subject: [PATCH] fix tox python3 overrides We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Also update pylint to 1.9.2. Change-Id: I3492f6f9061a08d28bfde1a1ea1bc820c2b082c8 Signed-off-by: Doug Hellmann Signed-off-by: Chuck Short --- lower-constraints.txt | 2 +- test-requirements.txt | 2 +- tox.ini | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 7d44eff..f7eec08 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -31,7 +31,7 @@ pep8==1.7.1 prettytable==0.7.2 pyflakes==1.0.0 Pygments==2.2.0 -pylint==1.4.5 +pylint==1.9.2 pyparsing==2.1.0 pyperclip==1.5.27 python-mimeparse==1.6.0 diff --git a/test-requirements.txt b/test-requirements.txt index d05e3e6..e40a77f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,6 +5,6 @@ flake8<2.6.0,>=2.5.4 # MIT hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD -pylint==1.4.5 # GPLv2 +pylint==1.9.2 # GPLv2 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index fdd750e..7a72d1b 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,7 @@ python_files = test_*.py norecursedirs = .tox .venv [testenv:venv] +basepython = python3 commands = {posargs} [testenv:py27] @@ -45,13 +46,16 @@ basepython = python3.5 basepython = python3.6 [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html [testenv:pep8] +basepython = python3 commands = flake8 freezerclient [testenv:pylint] +basepython = python3 commands = pylint --rcfile .pylintrc freezerclient [flake8] @@ -69,6 +73,7 @@ exclude = .venv,.tox,dist,doc,*egg,releasenotes [testenv:releasenotes] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt