Drop python2 tests
OpenStack is dropping the py2.7 support in ussuri cycle. magnum is ready with python 3 and ok to drop the python 2.7 support. https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html#completion-criteria Depends-On: https://review.opendev.org/693631 Change-Id: I2ce19b3f976619853117231ae0dae24ebe68601f Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
This commit is contained in:
parent
b07f8ba861
commit
3d17c6eb49
49
.zuul.yaml
49
.zuul.yaml
@ -62,44 +62,6 @@
|
|||||||
branch_override: default
|
branch_override: default
|
||||||
devstack_python3: 1
|
devstack_python3: 1
|
||||||
|
|
||||||
- job:
|
|
||||||
name: magnum-functional-base-python2
|
|
||||||
parent: legacy-dsvm-base
|
|
||||||
timeout: 7800
|
|
||||||
pre-run: playbooks/pre/prepare-workspace.yaml
|
|
||||||
run: playbooks/magnum-functional-base.yaml
|
|
||||||
post-run: playbooks/post/upload-logs.yaml
|
|
||||||
required-projects:
|
|
||||||
- openstack/devstack-gate
|
|
||||||
- openstack/diskimage-builder
|
|
||||||
- openstack/ironic
|
|
||||||
- openstack/ironic-lib
|
|
||||||
- openstack/ironic-python-agent
|
|
||||||
- openstack/magnum
|
|
||||||
- openstack/magnum-tempest-plugin
|
|
||||||
- x/pyghmi
|
|
||||||
- openstack/python-ironicclient
|
|
||||||
- openstack/python-magnumclient
|
|
||||||
- openstack/virtualbmc
|
|
||||||
irrelevant-files:
|
|
||||||
- ^.*\.rst$
|
|
||||||
- ^api-ref/.*$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^specs/.*$
|
|
||||||
- ^install-guide/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
- ^dockerfiles/.*$
|
|
||||||
vars:
|
|
||||||
ironic: 0
|
|
||||||
ceilometer: 0
|
|
||||||
swift: 0
|
|
||||||
horizon: 0
|
|
||||||
multinode: 0
|
|
||||||
neutron: 1
|
|
||||||
tempest: 0
|
|
||||||
branch_override: default
|
|
||||||
devstack_python3: 0
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: magnum-functional-multinode-base
|
name: magnum-functional-multinode-base
|
||||||
parent: legacy-dsvm-base-multinode
|
parent: legacy-dsvm-base-multinode
|
||||||
@ -143,12 +105,6 @@
|
|||||||
vars:
|
vars:
|
||||||
coe: api
|
coe: api
|
||||||
|
|
||||||
- job:
|
|
||||||
name: magnum-functional-api-python2
|
|
||||||
parent: magnum-functional-base-python2
|
|
||||||
vars:
|
|
||||||
coe: api
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: magnum-functional-coe
|
name: magnum-functional-coe
|
||||||
parent: magnum-functional-base
|
parent: magnum-functional-base
|
||||||
@ -368,15 +324,13 @@
|
|||||||
templates:
|
templates:
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-lower-constraints-jobs
|
- openstack-lower-constraints-jobs
|
||||||
- openstack-python-jobs
|
- openstack-python3-ussuri-jobs
|
||||||
- openstack-python3-train-jobs
|
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- magnum-functional-api
|
- magnum-functional-api
|
||||||
- magnum-functional-api-python2
|
|
||||||
- openstack-tox-cover:
|
- openstack-tox-cover:
|
||||||
voting: false
|
voting: false
|
||||||
- magnum-container-build
|
- magnum-container-build
|
||||||
@ -384,7 +338,6 @@
|
|||||||
queue: magnum
|
queue: magnum
|
||||||
jobs:
|
jobs:
|
||||||
- magnum-functional-api
|
- magnum-functional-api
|
||||||
- magnum-functional-api-python2
|
|
||||||
experimental:
|
experimental:
|
||||||
jobs:
|
jobs:
|
||||||
- magnum-functional-dcos
|
- magnum-functional-dcos
|
||||||
|
@ -49,7 +49,7 @@ Object Change Example
|
|||||||
The following example shows the unit test workflow when changing an object
|
The following example shows the unit test workflow when changing an object
|
||||||
(Cluster was updated to hold a new 'foo' field)::
|
(Cluster was updated to hold a new 'foo' field)::
|
||||||
|
|
||||||
tox -e py27 magnum.tests.unit.objects.test_objects
|
tox -e py37 magnum.tests.unit.objects.test_objects
|
||||||
|
|
||||||
This results in a unit test failure with the following output:
|
This results in a unit test failure with the following output:
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ All unit tests should be run using tox. To run magnum's entire test suite::
|
|||||||
|
|
||||||
To run a specific test, use a positional argument for the unit tests::
|
To run a specific test, use a positional argument for the unit tests::
|
||||||
|
|
||||||
# run a specific test for Python 2.7
|
# run a specific test for Python 3.7
|
||||||
tox -epy27 -- test_conductor
|
tox -epy37 -- test_conductor
|
||||||
|
|
||||||
You may pass options to the test programs using positional arguments::
|
You may pass options to the test programs using positional arguments::
|
||||||
|
|
||||||
# run all the Python 2.7 unit tests (in parallel!)
|
# run all the Python 3.7 unit tests (in parallel!)
|
||||||
tox -epy27 -- --parallel
|
tox -epy37 -- --parallel
|
||||||
|
|
||||||
To run only the pep8/flake8 syntax and style checks::
|
To run only the pep8/flake8 syntax and style checks::
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Python 2.7 support has been dropped. Last release magnum support py2.7
|
||||||
|
is OpenStack Train. The minimum version of Python now supported by magnum
|
||||||
|
is Python 3.6.
|
@ -13,8 +13,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
|
|
||||||
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
|
||||||
|
21
tox.ini
21
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = py27,py37,pep8
|
envlist = py37,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command =
|
install_command =
|
||||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
||||||
@ -24,11 +25,6 @@ commands =
|
|||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
|
||||||
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
|
||||||
|
|
||||||
[testenv:debug-py27]
|
|
||||||
basepython = python2.7
|
|
||||||
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
||||||
|
|
||||||
[testenv:functional-api]
|
[testenv:functional-api]
|
||||||
@ -109,7 +105,6 @@ commands =
|
|||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
||||||
bash tools/flake8wrap.sh {posargs}
|
bash tools/flake8wrap.sh {posargs}
|
||||||
@ -123,30 +118,24 @@ commands =
|
|||||||
-print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005"
|
-print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005"
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = bandit -r magnum -x tests -n5 -ll
|
commands = bandit -r magnum -x tests -n5 -ll
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
commands = {toxinidir}/tools/cover.sh {posargs}
|
commands = {toxinidir}/tools/cover.sh {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf
|
oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf
|
||||||
|
|
||||||
[testenv:genpolicy]
|
[testenv:genpolicy]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
oslopolicy-sample-generator --config-file etc/magnum/magnum-policy-generator.conf
|
oslopolicy-sample-generator --config-file etc/magnum/magnum-policy-generator.conf
|
||||||
|
|
||||||
@ -162,7 +151,6 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools,releasenotes
|
|||||||
local-check-factory = magnum.hacking.checks.factory
|
local-check-factory = magnum.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:pip-check-reqs]
|
[testenv:pip-check-reqs]
|
||||||
basepython = python3
|
|
||||||
# do not install test-requirements as that will pollute the virtualenv for
|
# do not install test-requirements as that will pollute the virtualenv for
|
||||||
# determining missing packages
|
# determining missing packages
|
||||||
# this also means that pip_check_reqs must be installed separately, outside
|
# this also means that pip_check_reqs must be installed separately, outside
|
||||||
@ -172,25 +160,21 @@ deps = pip_check_reqs
|
|||||||
commands=pip-missing-reqs -d --ignore-file=magnum/tests/* magnum
|
commands=pip-missing-reqs -d --ignore-file=magnum/tests/* magnum
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
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:install-guide]
|
[testenv:install-guide]
|
||||||
basepython = python3
|
|
||||||
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf api-ref/build
|
rm -rf api-ref/build
|
||||||
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: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
|
||||||
@ -199,7 +183,6 @@ deps =
|
|||||||
# This environment can be used to quickly validate that all needed system
|
# This environment can be used to quickly validate that all needed system
|
||||||
# packages required to successfully execute test targets are installed
|
# packages required to successfully execute test targets are installed
|
||||||
[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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user