Stop testing with py2

Python 2 is no longer supported. Python 3 is required.
This patch stops testing with Python 2.

Change-Id: Ia18f527ccacc14630a3ec4a2335c99a654b7fea0
This commit is contained in:
Tetsuro Nakamura 2019-10-28 02:17:03 +00:00
parent 5e3f2736fe
commit 31b690c1f7
3 changed files with 7 additions and 15 deletions

View File

@ -13,10 +13,9 @@ 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.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
[files]
packages =

View File

@ -5,8 +5,7 @@
hacking>=1.1.0,<1.2.0 # Apache-2.0
# docs
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,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
# releasenotes
reno>=2.5.0 # Apache-2.0

14
tox.ini
View File

@ -1,9 +1,11 @@
[tox]
minversion = 2.0
envlist = py35,py27,pypy,pep8
minversion = 3.1.1
envlist = py36,py37,pypy,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
setenv =
@ -16,15 +18,12 @@ deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source blazar_tempest_plugin --parallel-mode
@ -35,28 +34,23 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _