Stop testing Python 2

In Ussuri, Drop support for Python 2 according to [1] and [2]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010356.html
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html

Change-Id: I35e871992dd21e96e7e812e440e6cafdb61d26ac
This commit is contained in:
Arthur Dayne 2019-10-15 09:49:06 +08:00
parent f9a086e165
commit a92885a98b
4 changed files with 9 additions and 30 deletions

View File

@ -170,17 +170,15 @@
templates:
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- periodic-stable-jobs
- check-requirements
- integrated-gate
- integrated-gate-py3
- release-notes-jobs-python3
check:
jobs:
- keystone-dsvm-functional:
- keystone-dsvm-py3-functional:
irrelevant-files: &irrelevant-files
- ^.*\.rst$
- ^api-ref/.*$
@ -188,11 +186,6 @@
- ^etc/.*$
- ^keystone/tests/unit/.*$
- ^releasenotes/.*$
- keystone-dsvm-py3-functional:
irrelevant-files: *irrelevant-files
- keystone-dsvm-functional-federation-opensuse15:
voting: false
irrelevant-files: *irrelevant-files
- keystone-dsvm-py3-functional-federation-opensuse15:
voting: false
irrelevant-files: *irrelevant-files
@ -210,8 +203,6 @@
- ^keystone/tests/unit/.*$
- ^releasenotes/.*$
- ^setup.cfg$
- tempest-full:
irrelevant-files: *tempest-irrelevant-files
- tempest-full-py3:
irrelevant-files: *tempest-irrelevant-files
- neutron-grenade:

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Dropping the Python2 support in OpenStack Ussuri according to
`the TC deprecation timeline
<https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html>`_

View File

@ -13,8 +13,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
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,11 +1,12 @@
[tox]
minversion = 2.5.0
skipsdist = True
envlist = py27,py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes,protection
envlist = py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes,protection
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
basepython = python3
setenv = VIRTUAL_ENV={envdir}
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@ -20,14 +21,12 @@ whitelist_externals =
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
[testenv:api-ref]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
bash -c "rm -rf api-ref/build"
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:pep8]
basepython = python3
deps =
.[bandit]
{[testenv]deps}
@ -40,14 +39,12 @@ commands =
bandit -r keystone -x 'keystone/tests/*'
[testenv:fast8]
basepython = python3
envdir = {toxworkdir}/pep8
commands =
{toxinidir}/tools/fast8.sh
passenv = FAST8_NUM_COMMITS
[testenv:bandit]
basepython = python3
# NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove.
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
@ -56,7 +53,6 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/
commands = bandit -r keystone -x 'keystone/tests/*'
[testenv:cover]
basepython = python3
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv =
@ -70,16 +66,13 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:patch_cover]
basepython = python3
commands =
bash tools/cover.sh
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:debug]
basepython = python3
commands =
find keystone -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
@ -95,7 +88,6 @@ passenv =
KSTEST_PROJECT_ID
[testenv:functional]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
setenv = OS_TEST_PATH=./keystone/tests/functional
commands =
@ -133,7 +125,6 @@ exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*
max-complexity=24
[testenv:docs]
basepython = python3
deps =
-r{toxinidir}/doc/requirements.txt
.[ldap,memcache,mongodb]
@ -149,7 +140,6 @@ commands=
# the workaround after this patch has merged:
# https://review.opendev.org/#/c/679860
[testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
whitelist_externals =
@ -163,16 +153,13 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=config-generator/keystone.conf
[testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file config-generator/keystone-policy-generator.conf
[hacking]
@ -182,7 +169,6 @@ import_exceptions =
local-check-factory = keystone.tests.hacking.checks.factory
[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
@ -191,14 +177,12 @@ deps = bindep
commands = bindep test
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
.[ldap,memcache,mongodb]
[testenv:protection]
basepython = python3
commands =
find keystone -type f -name "*.pyc" -delete
stestr run --test-path=./keystone/tests/protection {posargs}