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:
templates:
- openstack-python-jobs
- openstack-cover-jobs
- check-requirements
- 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
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

14
tox.ini
View File

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