Merge "Stop testing python 2"

This commit is contained in:
Zuul 2019-12-02 22:24:05 +00:00 committed by Gerrit Code Review
commit bc984d90fe
8 changed files with 12 additions and 66 deletions

View File

@ -28,12 +28,12 @@ To run the full suite of tests maintained within Octavia.
To run tests for one or more specific test environments(for example, the most To run tests for one or more specific test environments(for example, the most
common configuration of Python 2.7 and PEP-8), list the environments with the common configuration of Python 3.7 and PEP-8), list the environments with the
``-e`` option, separated by spaces: ``-e`` option, separated by spaces:
.. code-block:: bash .. code-block:: bash
$ tox -e py27,pep8 $ tox -e py37,pep8
See ``tox -l`` for the full list of available test environments. See ``tox -l`` for the full list of available test environments.

View File

@ -9,7 +9,6 @@ sphinxcontrib-blockdiag>=1.5.4 # BSD
sphinxcontrib-nwdiag>=0.9.5 # BSD sphinxcontrib-nwdiag>=0.9.5 # BSD
sphinxcontrib-seqdiag>=0.8.4 # BSD sphinxcontrib-seqdiag>=0.8.4 # BSD
docutils>=0.11 # OSI-Approved Open Source, Public Domain docutils>=0.11 # OSI-Approved Open Source, Public Domain
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
graphviz!=0.5.0,>=0.4 # MIT License graphviz!=0.5.0,>=0.4 # MIT License
openstackdocstheme>=1.20.0 # Apache-2.0 openstackdocstheme>=1.20.0 # Apache-2.0
@ -24,5 +23,4 @@ sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
pydot>=1.2.4 # MIT License pydot>=1.2.4 # MIT License
pydotplus>=2.0.2 # MIT License pydotplus>=2.0.2 # MIT License
pyparsing>=2.1.0 # MIT pyparsing>=2.1.0 # MIT
networkx>=1.10,<2.3;python_version<'3.0' # BSD
networkx>=1.10;python_version>='3.4' # BSD networkx>=1.10;python_version>='3.4' # BSD

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The minimum version of Python now
supported by Octavia is Python 3.6.

View File

@ -40,7 +40,6 @@ WSME>=0.8.0 # MIT
Jinja2>=2.10 # BSD License (3 clause) Jinja2>=2.10 # BSD License (3 clause)
taskflow>=2.16.0 # Apache-2.0 taskflow>=2.16.0 # Apache-2.0
diskimage-builder>=2.24.0 # Apache-2.0 diskimage-builder>=2.24.0 # Apache-2.0
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
castellan>=0.16.0 # Apache-2.0 castellan>=0.16.0 # Apache-2.0
tenacity>=5.0.4 # Apache-2.0 tenacity>=5.0.4 # Apache-2.0
distro>=1.2.0 # Apache-2.0 distro>=1.2.0 # Apache-2.0
@ -54,8 +53,7 @@ setproctitle>=1.1.10 # BSD
#for the amphora api #for the amphora api
Flask!=0.11,>=0.10 # BSD Flask!=0.11,>=0.10 # BSD
netifaces>=0.10.4 # MIT netifaces>=0.10.4 # MIT
ipaddress>=1.0.17;python_version<'3.3' # PSF
cryptography>=2.1 # BSD/Apache-2.0 cryptography>=2.1 # BSD/Apache-2.0
pyroute2>=0.4.21;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2) pyroute2>=0.4.21;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
gunicorn>=19.9.0 # MIT gunicorn>=19.9.0;python_version>='3.0' # MIT
Werkzeug>=0.14.1 # BSD License Werkzeug>=0.14.1 # BSD License

View File

@ -15,7 +15,6 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
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
@ -38,9 +37,6 @@ data_files =
diskimage-create/tox.ini diskimage-create/tox.ini
diskimage-create/version.txt diskimage-create/version.txt
[wheel]
universal = 1
[entry_points] [entry_points]
wsgi_scripts = wsgi_scripts =
octavia-wsgi = octavia.api.app:setup_app octavia-wsgi = octavia.api.app:setup_app

View File

@ -9,7 +9,6 @@ flake8-import-order==0.12 # LGPLv3
mock>=2.0.0 # BSD mock>=2.0.0 # BSD
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
pylint==1.9.2;python_version<'3.0' # GPLv2
pylint>=1.9.2;python_version>='3.0' # GPLv2 pylint>=1.9.2;python_version>='3.0' # GPLv2
testrepository>=0.0.18 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
@ -19,6 +18,5 @@ doc8>=0.6.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0 bandit!=1.6.0,>=1.1.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0
# Required for pep8 - doc8 tests # Required for pep8 - doc8 tests
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
bashate>=0.5.1 # Apache-2.0 bashate>=0.5.1 # Apache-2.0

30
tox.ini
View File

@ -1,9 +1,11 @@
[tox] [tox]
minversion = 2.5.0 minversion = 2.5.0
envlist = docs,py27,py36,py37,functional-py37,functional-py36,functional,pep8,specs envlist = docs,py36,py37,functional-py36,functional-py37,pep8,specs
skipsdist = True skipsdist = True
ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
@ -18,7 +20,6 @@ commands =
stestr slowest stestr slowest
[testenv:api-ref] [testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish # This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org. # the API Ref to docs.openstack.org.
deps = deps =
@ -31,7 +32,6 @@ commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:cover] [testenv:cover]
basepython = python3
whitelist_externals = sh whitelist_externals = sh
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
@ -48,12 +48,7 @@ commands =
coverage report --fail-under=90 --skip-covered coverage report --fail-under=90 --skip-covered
[testenv:functional] [testenv:functional]
# This is set as py27 right now, though the name is ambiguous. # This will use whatever 'basepython' is set to, so the name is ambiguous.
basepython = python2.7
setenv = OS_TEST_PATH={toxinidir}/octavia/tests/functional
[testenv:functional-py27]
basepython = python2.7
setenv = OS_TEST_PATH={toxinidir}/octavia/tests/functional setenv = OS_TEST_PATH={toxinidir}/octavia/tests/functional
[testenv:functional-py36] [testenv:functional-py36]
@ -65,15 +60,9 @@ basepython = python3.7
setenv = OS_TEST_PATH={toxinidir}/octavia/tests/functional setenv = OS_TEST_PATH={toxinidir}/octavia/tests/functional
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 commands = flake8
# RST linter # RST linter
doc8 --ignore-path doc/source/contributor/modules specs \ doc8 --ignore-path doc/source/contributor/modules specs \
@ -93,7 +82,6 @@ whitelist_externals =
bash bash
[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
@ -105,7 +93,6 @@ commands =
sphinx-build -W -b html api-ref/source api-ref/build/html sphinx-build -W -b html api-ref/source api-ref/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
whitelist_externals = whitelist_externals =
make make
@ -116,11 +103,9 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:genconfig] [testenv:genconfig]
basepython = python3
whitelist_externals = mkdir whitelist_externals = mkdir
commands = commands =
mkdir -p etc/octavia mkdir -p etc/octavia
@ -133,7 +118,6 @@ commands =
--namespace cotyledon --namespace cotyledon
[testenv:genpolicy] [testenv:genpolicy]
basepython = python3
whitelist_externals = mkdir whitelist_externals = mkdir
commands = commands =
mkdir -p etc/octavia mkdir -p etc/octavia
@ -141,7 +125,6 @@ commands =
--config-file etc/policy/octavia-policy-generator.conf --config-file etc/policy/octavia-policy-generator.conf
[testenv:specs] [testenv:specs]
basepython = python3
whitelist_externals = whitelist_externals =
rm rm
find find
@ -151,7 +134,6 @@ commands =
[testenv:bandit] [testenv:bandit]
basepython = python3
commands = bandit -r octavia -ll -ii -x tests commands = bandit -r octavia -ll -ii -x tests
[flake8] [flake8]
@ -170,7 +152,6 @@ import-order-style = pep8
enable-extensions=H106,H203,H204,H205,H904 enable-extensions=H106,H203,H204,H205,H904
[testenv:bashate] [testenv:bashate]
basepython = python3
envdir = {toxworkdir}/shared envdir = {toxworkdir}/shared
commands = bash -c "find {toxinidir} \ commands = bash -c "find {toxinidir} \
-not \( -type d -name .tox\* -prune \) \ -not \( -type d -name .tox\* -prune \) \
@ -191,7 +172,6 @@ local-check-factory = octavia.hacking.checks.factory
max-line-length = 79 max-line-length = 79
[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
@ -202,7 +182,6 @@ 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: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
@ -213,7 +192,6 @@ commands =
sh -c 'OS_TEST_PATH={toxinidir}/octavia/tests/functional stestr run {posargs}' sh -c 'OS_TEST_PATH={toxinidir}/octavia/tests/functional stestr run {posargs}'
[testenv:requirements] [testenv:requirements]
basepython = python3
deps = deps =
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
whitelist_externals = sh whitelist_externals = sh

View File

@ -6,20 +6,12 @@
- periodic-stable-jobs-neutron - periodic-stable-jobs-neutron
- 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
- octavia-tox-tips - octavia-tox-tips
check: check:
jobs: jobs:
- openstack-tox-functional:
irrelevant-files:
- ^.*\.rst$
- ^api-ref/.*$
- ^doc/.*$
- ^etc/.*$
- ^releasenotes/.*$
- openstack-tox-functional-py36: - openstack-tox-functional-py36:
irrelevant-files: irrelevant-files:
- ^.*\.rst$ - ^.*\.rst$
@ -28,15 +20,9 @@
- ^etc/.*$ - ^etc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- octavia-v2-dsvm-noop-api - octavia-v2-dsvm-noop-api
- octavia-v2-dsvm-noop-py2-api
- octavia-v2-dsvm-scenario - octavia-v2-dsvm-scenario
- octavia-v2-dsvm-py2-scenario
- octavia-v2-dsvm-py2-scenario-centos-7:
voting: false
- octavia-v2-dsvm-scenario-two-node: - octavia-v2-dsvm-scenario-two-node:
voting: false voting: false
- octavia-v2-dsvm-py2-scenario-two-node:
voting: false
# TODO(haleyb): restore to voting once python3 issues fixed # TODO(haleyb): restore to voting once python3 issues fixed
- octavia-grenade: - octavia-grenade:
voting: false voting: false
@ -68,21 +54,10 @@
voting: false voting: false
- octavia-v2-act-stdby-iptables-dsvm-scenario: - octavia-v2-act-stdby-iptables-dsvm-scenario:
voting: false voting: false
- octavia-v2-act-stdby-iptables-dsvm-py2-scenario:
voting: false
- octavia-v2-act-stdby-iptables-dsvm-py2-scenario-centos-7:
voting: false
gate: gate:
fail-fast: true fail-fast: true
queue: octavia queue: octavia
jobs: jobs:
- openstack-tox-functional:
irrelevant-files:
- ^.*\.rst$
- ^api-ref/.*$
- ^doc/.*$
- ^etc/.*$
- ^releasenotes/.*$
- openstack-tox-functional-py36: - openstack-tox-functional-py36:
irrelevant-files: irrelevant-files:
- ^.*\.rst$ - ^.*\.rst$
@ -91,9 +66,7 @@
- ^etc/.*$ - ^etc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- octavia-v2-dsvm-noop-api - octavia-v2-dsvm-noop-api
- octavia-v2-dsvm-noop-py2-api
- octavia-v2-dsvm-scenario - octavia-v2-dsvm-scenario
- octavia-v2-dsvm-py2-scenario
periodic: periodic:
jobs: jobs:
- publish-openstack-octavia-amphora-image-xenial: - publish-openstack-octavia-amphora-image-xenial: