Drop Python2 support and testing

Remove Python2 CI testing and set the minimum Python version required
in setup.cfg.

Change-Id: Ifc65c94c00990bc50a5ae3789b71ae8c24b99e94
This commit is contained in:
Rodolfo Alonso Hernandez 2020-01-18 12:44:32 +00:00
parent d74ca437b4
commit 3134ffe712
4 changed files with 7 additions and 19 deletions

View File

@ -1,7 +1,6 @@
- project:
templates:
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -1,7 +1,7 @@
#!/bin/sh
if [ -z "${PYTHON}" ]; then
PYTHON=python
PYTHON=python3
fi
usage() {

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = http://www.openstack.org/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,8 +14,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
@ -41,6 +40,3 @@ input_file = os_ken/locale/os_ken.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = os_ken/locale/os_ken.pot
[wheel]
universal = 1

15
tox.ini
View File

@ -1,11 +1,12 @@
[tox]
minversion = 2.0
envlist = py27,py37,pep8
minversion = 3.1.1
envlist = py37,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
@ -21,15 +22,12 @@ deps =
commands = python ./os_ken/tests/run_tests.py {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 os_ken --parallel-mode
@ -40,12 +38,10 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
whitelist_externals =
@ -55,13 +51,11 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps}
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]
@ -101,7 +95,6 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,os_ken/contrib
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt