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

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

Senlin 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: I0377788d0db0e60d44c35f1d26eefd58502a452a
This commit is contained in:
Ghanshyam Mann 2019-11-17 17:48:21 +00:00
parent 9523029e02
commit 29c0e6fbdf
6 changed files with 10 additions and 75 deletions

View File

@ -2,19 +2,14 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
jobs:
- senlin-dsvm-tempest-py27-api
- senlin-dsvm-tempest-py3-api
- senlin-tempest-api-ipv6-only
- senlin-dsvm-tempest-py27-functional
- senlin-dsvm-tempest-py3-functional
- senlin-dsvm-tempest-py27-integration:
voting: false
- senlin-dsvm-tempest-py3-integration:
voting: false
- openstack-tox-cover:
@ -22,10 +17,8 @@
gate:
queue: senlin
jobs:
- senlin-dsvm-tempest-py27-api
- senlin-dsvm-tempest-py35-api
- senlin-tempest-api-ipv6-only
- senlin-dsvm-tempest-py27-functional
- senlin-dsvm-tempest-py35-functional
experimental:
jobs:
@ -52,6 +45,7 @@
senlin: https://opendev.org/openstack/senlin
devstack_localrc:
TEMPEST_PLUGINS: '/opt/stack/senlin-tempest-plugin'
USE_PYTHON3: true
devstack_local_conf:
test-config:
$TEMPEST_CONFIG:
@ -61,54 +55,6 @@
delete_with_dependency: True
health_policy_version: '1.1'
- job:
name: senlin-dsvm-tempest-py27-api
parent: senlin-tempest-base
vars:
tempest_test_regex: senlin_tempest_plugin.tests.api
devstack_local_conf:
post-config:
$SENLIN_CONF:
DEFAULT:
cloud_backend: openstack_test
- job:
name: senlin-dsvm-tempest-py27-functional
parent: senlin-tempest-base
vars:
tempest_test_regex: senlin_tempest_plugin.tests.functional
devstack_local_conf:
post-config:
$SENLIN_CONF:
DEFAULT:
cloud_backend: openstack_test
health_check_interval_min: 10
- job:
name: senlin-dsvm-tempest-py27-integration
parent: senlin-tempest-base
vars:
tempest_test_regex: senlin_tempest_plugin.tests.integration
devstack_plugins:
zaqar: https://opendev.org/openstack/zaqar
heat: https://opendev.org/openstack/heat
devstack_localrc:
TEMPEST_PLUGINS: '"/opt/stack/senlin-tempest-plugin /opt/stack/zaqar-tempest-plugin"'
devstack_local_conf:
post-config:
$SENLIN_CONF:
DEFAULT:
health_check_interval_min: 10
required-projects:
- openstack/heat
- openstack/octavia
- openstack/python-zaqarclient
- openstack/senlin
- openstack/senlin-tempest-plugin
- openstack/zaqar
- openstack/zaqar-ui
- openstack/zaqar-tempest-plugin
- job:
name: senlin-dsvm-tempest-py3-api
parent: senlin-tempest-base

View File

@ -4,6 +4,5 @@
# this is required for the docs build jobs
openstackdocstheme>=1.20.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.5;python_version>='3.4' # BSD
reno>=2.5.0 # Apache-2.0

View File

@ -48,7 +48,7 @@
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_PREPOPULATE_USERS=0
export DEVSTACK_GATE_USE_PYTHON3=False
export DEVSTACK_GATE_USE_PYTHON3=True
export USE_KEYSTONE_V2API=0
export RALLY_SCENARIO=$ZUUL_SHORT_PROJECT_NAME-senlin

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of Senlin
to support python 2.7 is OpenStack Train. The minimum version of Python now
supported by Senlin 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,10 +1,10 @@
[tox]
minversion = 2.0
envlist = py27,py37,pep8,functional
envlist = py37,pep8,functional
skipsdist = True
[testenv]
basepython = python3
# Note the hash seed is set to 0 until senlin can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
@ -27,44 +27,34 @@ whitelist_externals = bash
basepython = python3
commands = oslo_debug_helper -t senlin/tests/unit {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper -t senlin/tests/unit {posargs}
[testenv:debug-py36]
basepython = python3.6
commands = oslo_debug_helper -t senlin/tests/unit {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8 senlin doc/source/ext
[testenv:genconfig]
basepython = python3
envdir = {toxworkdir}/venv
commands =
{toxinidir}/tools/gen-config
[testenv:genpolicy]
basepython = python3
envdir = {toxworkdir}/venv
commands =
{toxinidir}/tools/gen-policy
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source senlin --parallel-mode
commands = {toxinidir}/tools/cover.sh {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
@ -72,12 +62,10 @@ commands =
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:api-ref]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
@ -97,12 +85,10 @@ local-check-factory = senlin.hacking.checks.factory
import_exceptions = senlin.common.i18n
[testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r senlin -x tests -s B101,B104,B110,B310,B311,B506
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt