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

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

Mistral 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

Change-Id: Ica51b3b36f3784b4b04731406b6bf8320d5de4b8
This commit is contained in:
Ghanshyam Mann 2019-11-15 14:44:36 +00:00
parent a3bb6f08e3
commit fa2042a821
5 changed files with 13 additions and 19 deletions

View File

@ -3,6 +3,8 @@
parent: devstack parent: devstack
timeout: 7800 timeout: 7800
vars: vars:
devstack_localrc:
USE_PYTHON3: true
devstack_plugins: devstack_plugins:
mistral: https://opendev.org/openstack/mistral mistral: https://opendev.org/openstack/mistral
heat: https://opendev.org/openstack/heat heat: https://opendev.org/openstack/heat
@ -34,6 +36,8 @@
devstack_plugins: devstack_plugins:
rally-openstack: https://opendev.org/openstack/rally-openstack rally-openstack: https://opendev.org/openstack/rally-openstack
rally_task: rally-jobs/task-mistral.yaml rally_task: rally-jobs/task-mistral.yaml
devstack_localrc:
USE_PYTHON3: true
required-projects: required-projects:
- openstack/rally-openstack - openstack/rally-openstack
@ -90,7 +94,6 @@
- project: - project:
templates: templates:
- openstack-python-jobs
- openstack-python3-ussuri-jobs - openstack-python3-ussuri-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- check-requirements - check-requirements
@ -112,9 +115,6 @@
- openstack-tox-py37: - openstack-tox-py37:
required-projects: required-projects:
- openstack/mistral-lib - openstack/mistral-lib
- openstack-tox-py27:
required-projects:
- openstack/mistral-lib
- mistral-devstack - mistral-devstack
- mistral-devstack-non-apache - mistral-devstack-non-apache
- mistral-devstack-kombu - mistral-devstack-kombu

View File

@ -48,6 +48,7 @@
# mistral with "check experimental" and trigger the gate). After # mistral with "check experimental" and trigger the gate). After
# it's ready it'll be better to create a special builder in this # it's ready it'll be better to create a special builder in this
# file. # file.
export DEVSTACK_GATE_USE_PYTHON3=True
ha_gate/install.sh ha_gate/install.sh
ha_gate/run_tests.sh ha_gate/run_tests.sh
chdir: '{{ ansible_user_dir }}/workspace' chdir: '{{ ansible_user_dir }}/workspace'

View File

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

View File

@ -7,8 +7,6 @@ license = Apache License, Version 2.0
home-page = https://docs.openstack.org/mistral/latest/ home-page = https://docs.openstack.org/mistral/latest/
classifiers = classifiers =
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7

15
tox.ini
View File

@ -1,9 +1,10 @@
[tox] [tox]
envlist = py27,py37,pep8 envlist = py37,pep8
minversion = 2.0 minversion = 2.0
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
install_command = pip install {opts} {packages} install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
@ -25,25 +26,21 @@ whitelist_externals =
find find
[testenv:unit-postgresql] [testenv:unit-postgresql]
basepython = python3
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
passenv = ZUUL_PROJECT passenv = ZUUL_PROJECT
commands = ./run_tests.sh -N --db-type postgresql commands = ./run_tests.sh -N --db-type postgresql
[testenv:unit-mysql] [testenv:unit-mysql]
basepython = python3
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
passenv = ZUUL_PROJECT passenv = ZUUL_PROJECT
commands = ./run_tests.sh -N --db-type mysql commands = ./run_tests.sh -N --db-type mysql
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
doc8 doc/source doc8 doc/source
flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source mistral --parallel-mode PYTHON=coverage run --source mistral --parallel-mode
@ -54,26 +51,22 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:genconfig] [testenv:genconfig]
basepython = python3
commands = commands =
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \ oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
--output-file etc/mistral.conf.sample --output-file etc/mistral.conf.sample
[testenv:genpolicy] [testenv:genpolicy]
basepython = python3
commands = commands =
oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \ oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \
--output-file etc/policy.yaml.sample --output-file etc/policy.yaml.sample
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing. #set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:venv] [testenv:venv]
basepython = python3
setenv = PYTHONHASHSEED=0 setenv = PYTHONHASHSEED=0
commands = {posargs} commands = {posargs}
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing. #set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
setenv = PYTHONHASHSEED=0 setenv = PYTHONHASHSEED=0
commands = commands =
@ -81,7 +74,6 @@ commands =
sphinx-build -E -W --keep-going -b html doc/source doc/build/html sphinx-build -E -W --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
whitelist_externals = whitelist_externals =
make make
@ -90,13 +82,11 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = commands =
rm -rf releasenotes/build rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:api-ref] [testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish # This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org. # the API Ref to docs.openstack.org.
commands = commands =
@ -125,7 +115,6 @@ local-check-factory = mistral.hacking.checks.factory
import_exceptions = mistral._i18n import_exceptions = mistral._i18n
[testenv:lower-constraints] [testenv:lower-constraints]
basepython = python3
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt