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

View File

@ -27,6 +27,7 @@
cmd: | cmd: |
set -e set -e
set -x set -x
export DEVSTACK_GATE_USE_PYTHON3=true
export PYTHONUNBUFFERED=true export PYTHONUNBUFFERED=true
export BRANCH_OVERRIDE=default export BRANCH_OVERRIDE=default
export DEVSTACK_PROJECT_FROM_GIT=python-novaclient 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 License :: OSI Approved :: Apache Software License
Operating System :: OS Independent Operating System :: OS Independent
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7

20
tox.ini
View File

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