Stop testing python2.7

Python 2.7 support has been dropped. Last release of Cyborg to support
py2.7 is OpenStack Train. The minimum version of Python now
supported by Cyborg is Python 3.6.

Depends-On: https://review.opendev.org/#/c/691766/
Change-Id: Ie87ef7727b50d8d5ca43f0283c5688199c35412e
This commit is contained in:
Arthur Dayne 2019-10-30 10:42:54 +08:00
parent b0f1842429
commit 6b9ab023e1
4 changed files with 7 additions and 15 deletions

View File

@ -1,6 +1,5 @@
- project: - project:
templates: templates:
- openstack-python-jobs
- openstack-cover-jobs - openstack-cover-jobs
- check-requirements - check-requirements
- release-notes-jobs-python3 - release-notes-jobs-python3

View File

@ -0,0 +1,5 @@
---
other:
- |
Drop support for python2 as per `this
<https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline>`_ message

View File

@ -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

14
tox.ini
View File

@ -1,12 +1,13 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = py27,py36,py37,pep8 envlist = py36,py37,pep8
skipsdist = True skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
whitelist_externals = rm whitelist_externals = rm
install_command = {[testenv:common-constraints]install_command} install_command = {[testenv:common-constraints]install_command}
basepython = python3
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
OS_TEST_PATH=cyborg/tests/unit OS_TEST_PATH=cyborg/tests/unit
@ -18,18 +19,15 @@ commands = rm -f .testrepository/times.dbm
stestr run --slowest {posargs} stestr run --slowest {posargs}
[testenv:common-constraints] [testenv:common-constraints]
basepython = python3
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
[testenv:genpolicy] [testenv:genpolicy]
basepython = python3
sitepackages = False sitepackages = False
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
commands = commands =
oslopolicy-sample-generator --config-file=tools/config/cyborg-policy-generator.conf oslopolicy-sample-generator --config-file=tools/config/cyborg-policy-generator.conf
[testenv:genconfig] [testenv:genconfig]
basepython = python3
sitepackages = False sitepackages = False
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
commands = commands =
@ -42,29 +40,24 @@ commands =
# separately, outside of the requirements files, and develop mode disabled # separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this # explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above). # further relies on "tox.skipsdist = True" above).
basepython = python3
deps = bindep deps = bindep
commands = bindep test commands = bindep test
usedevelop = False usedevelop = False
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
flake8 flake8
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
[testenv:pep8-constraints] [testenv:pep8-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command} install_command = {[testenv:common-constraints]install_command}
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
PYTHON=coverage run --source cyborg --parallel-mode PYTHON=coverage run --source cyborg --parallel-mode
commands = commands =
@ -79,18 +72,15 @@ ignore-path = .venv,.git,.tox,*cyborg/locale*,*lib/python*,*cyborg.egg*,api-ref/
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper -t cyborg/tests {posargs} commands = oslo_debug_helper -t cyborg/tests {posargs}
[testenv:api-ref] [testenv:api-ref]