Stop supporting and testing python2

Change-Id: If678d77b8da69121b0075bfbc4216531be25da6a
This commit is contained in:
Eric Fried 2019-10-25 09:28:16 -05:00
parent cd9958bdb0
commit baccd5bcfa
5 changed files with 8 additions and 22 deletions

View File

@ -1,4 +1,5 @@
- job:
# TODO(efried): Cut over to zuulv3
name: novaclient-dsvm-functional
parent: legacy-dsvm-base
run: playbooks/legacy/novaclient-dsvm-functional/run.yaml
@ -16,11 +17,9 @@
- project:
templates:
- check-requirements
- lib-forward-testing
- lib-forward-testing-python3
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -27,6 +27,7 @@
cmd: |
set -e
set -x
export DEVSTACK_GATE_USE_PYTHON3=true
export PYTHONUNBUFFERED=true
export BRANCH_OVERRIDE=default
export DEVSTACK_PROJECT_FROM_GIT=python-novaclient

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Python 2 is no longer supported. Python 3 is required.

View File

@ -16,8 +16,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

20
tox.ini
View File

@ -1,9 +1,10 @@
[tox]
envlist = py27,py37,pep8,docs
envlist = py37,pep8,docs
minversion = 2.0
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
# tox is silly... these need to be separated by a newline....
whitelist_externals =
@ -22,15 +23,12 @@ commands =
stestr run {posargs}
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:bandit]
basepython = python3
commands = bandit -r novaclient -n5 -x tests
[testenv:venv]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@ -39,7 +37,6 @@ deps =
commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
@ -51,7 +48,6 @@ commands =
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
[testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
@ -60,7 +56,6 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
@ -69,21 +64,12 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:functional]
basepython = python2.7
passenv = OS_NOVACLIENT_TEST_NETWORK
commands =
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
python novaclient/tests/functional/hooks/check_resources.py
[testenv:functional-py36]
basepython = python3.6
passenv = OS_NOVACLIENT_TEST_NETWORK
commands =
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
python novaclient/tests/functional/hooks/check_resources.py
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source novaclient --parallel-mode
commands =
@ -110,7 +96,6 @@ exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasen
import_exceptions = novaclient.i18n
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
@ -119,7 +104,6 @@ deps = bindep
commands = bindep test
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt