diff options
author | Jeremy Stanley <fungi@yuggoth.org> | 2021-03-11 19:50:40 +0000 |
---|---|---|
committer | Guillaume Chauvel <guillaume.chauvel@gmail.com> | 2021-03-30 14:56:40 +0200 |
commit | f995fba9a66a820c7f06dd86f39d40d0ae18acaa (patch) | |
tree | a39f863d30a00cd218131f4f543d679d0dd94f85 | |
parent | 66ba8442dcaba24de0322793876bd241858b49a3 (diff) | |
download | gear-f995fba9a66a820c7f06dd86f39d40d0ae18acaa.tar.gz |
Update testing to Python 3.9 and linters
In preparation for an upcoming release, add testing for latest
Python (3.9). Switch tox to use Python 3 by default, and rename the
testenv for flake8 from pep8 to linters, consistent with other tools
and libraries OpenDev maintains. Update to a newer hacking plugin,
which will use newer flake8 as well. Ignore rules about line breaks
around comparison operators, as well as those related to ambiguous
variable names, at least for now. Also build distribution artifacts
on a more recent platform so we get newer Setuptools with support
for the latest package metadata, in preparation for a coming change
to update that.
Change-Id: I2130d66fc9aadaa9fe09635b59475be71938132e
-rw-r--r-- | .zuul.yaml | 17 | ||||
-rw-r--r-- | test-requirements.txt | 2 | ||||
-rw-r--r-- | tox.ini | 8 |
3 files changed, 18 insertions, 9 deletions
@@ -60,19 +60,25 @@ - publish-opendev-tox-docs check: jobs: - - tox-pep8 + - tox-linters - tox-py27 - tox-py35: nodeset: ubuntu-xenial - - build-python-release + - tox-py39: + nodeset: ubuntu-focal + - build-python-release: + nodeset: ubuntu-focal - gear-build-opendev-image gate: jobs: - - tox-pep8 + - tox-linters - tox-py27 - tox-py35: nodeset: ubuntu-xenial - - build-python-release + - tox-py39: + nodeset: ubuntu-focal + - build-python-release: + nodeset: ubuntu-focal - gear-upload-opendev-image promote: jobs: @@ -80,7 +86,8 @@ - gear-promote-opendev-image release: jobs: - - opendev-release-python + - opendev-release-python: + nodeset: ubuntu-focal - upload-docker-image: secrets: name: docker_credentials diff --git a/test-requirements.txt b/test-requirements.txt index 45cf7b4..9a33e71 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0 +hacking>=2.0.0,<2.1.0 # Apache-2.0 coverage>=3.6 fixtures>=0.3.12 @@ -1,11 +1,13 @@ [tox] minversion = 1.6 skipsdist = True -envlist = py34,py35,py27,pep8 +envlist = py3,py27,linters +ignore_basepython_conflict = true [testenv] setenv = VIRTUAL_ENV={envdir} usedevelop = True +basepython = python3 install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -15,7 +17,7 @@ commands = [tox:jenkins] sitepackages = True -[testenv:pep8] +[testenv:linters] commands = flake8 [testenv:cover] @@ -30,7 +32,7 @@ commands = {posargs} exclude = .venv,.tox,dist,doc,*.egg show-source = true # E123, E125, E129 and H ignored intentionally in this code-base -ignore = E123,E125,E129,H +ignore = E123,E125,E129,E741,W504,H [testenv:docs] basepython = python3 |