[ussuri][goal] Drop python 2.7 support and testing

OpenStack is dropping the py2.7 support in ussuri cycle.

Masakari is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I144571286343e6be2518e3fe72e33c86a0fd0dfe
This commit is contained in:
Ghanshyam Mann
2019-11-15 14:21:50 +00:00
parent 596b3d142e
commit d46ea6b110
4 changed files with 11 additions and 20 deletions

View File

@@ -46,6 +46,8 @@
devstack_services:
horizon: false
swift: false
devstack_localrc:
USE_PYTHON3: true
zuul_work_dir: src/opendev.org/openstack/masakari
host-vars:
controller:
@@ -83,8 +85,7 @@
- check-requirements
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:

View File

@@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of Masakari
to support python 2.7 is OpenStack Train. The minimum version of Python now
supported by Masakari is Python 3.6.

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

18
tox.ini
View File

@@ -1,9 +1,10 @@
[tox]
minversion = 2.0
envlist = pep8,py27,py36,py37
envlist = pep8,py36,py37
skipsdist = 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 = VIRTUAL_ENV={envdir}
@@ -22,11 +23,6 @@ commands =
find . -type f -name "*.pyc" -delete
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
[testenv:py27]
commands =
{[testenv]commands}
stestr run {posargs}
[testenv:py36]
basepython = python3.6
commands =
@@ -40,13 +36,11 @@ commands =
stestr run {posargs}
[testenv:functional]
basepython = python3
commands =
{[testenv]commands}
stestr --test-path=./masakari/tests/functional run --concurrency=1 --slowest {posargs}
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/masakari/masakari-config-generator.conf
oslo-config-generator --config-file=etc/masakari/masakari-customized-recovery-flow-config-generator.conf
@@ -54,15 +48,12 @@ commands = oslo-config-generator --config-file=etc/masakari/masakari-config-gene
commands = oslopolicy-sample-generator --config-file=etc/masakari/masakari-policy-generator.conf
[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 masakari --parallel-mode
@@ -74,13 +65,11 @@ commands =
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
basepython = python3
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
basepython = python3
commands =
rm -fr releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@@ -90,7 +79,6 @@ basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
commands =
@@ -116,7 +104,6 @@ local-check-factory = masakari.hacking.checks.factory
import_exceptions = masakari.i18n
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
@@ -129,7 +116,6 @@ deps =
# 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