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

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

kayobe 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: Idbbdd96ff23846d29833c5997d1e32e65b5169f2
This commit is contained in:
Ghanshyam Mann 2019-11-22 02:23:19 +00:00 committed by Mark Goddard
parent d5a3c74b16
commit c0a1216afa
6 changed files with 20 additions and 23 deletions

View File

@ -4,6 +4,5 @@
openstackdocstheme>=1.19.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

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

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
# In below section we have to include the roles directory explicitly
# to Workaround PBR bug:

17
tox.ini
View File

@ -1,9 +1,10 @@
[tox]
minversion = 2.0
envlist = py3,py27,pep8
envlist = py3,pep8
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
passenv =
@ -24,7 +25,6 @@ deps =
commands = stestr run {posargs}
[testenv:pep8]
basepython = python3
# sphinx8 needs the sphinx package which is required via doc/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
@ -41,7 +41,6 @@ commands =
yamllint etc/kayobe
[testenv:venv]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/test-requirements.txt
@ -49,7 +48,8 @@ deps =
commands = {posargs}
[testenv:ansible]
# Kolla currently fails during password generation under python3. Revisit in Rocky.
# FIXME(mgoddard): Ansible playbooks do not yet support Python 3, so we need to run these
# tests using Python 2 for the time being.
basepython = python2
usedevelop = True
# Create the virtualenv with access to system site packages, as this is
@ -63,8 +63,6 @@ commands =
{toxinidir}/tools/test-ansible.sh {posargs}
[testenv:molecule]
# Molecule only supports python 2.7 and 3.6.
basepython = python2
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/test-requirements.txt
@ -79,11 +77,9 @@ commands =
bash -c "source {envdir}/bin/activate && {toxinidir}/tools/test-molecule.sh {posargs}"
[testenv:alint]
basepython = python3
commands = ansible-lint ansible/*.yaml
[testenv:ansible-syntax]
basepython = python3
commands =
# Install ansible role dependencies from Galaxy.
{toxinidir}/tools/ansible-galaxy-retried.sh install \
@ -104,7 +100,6 @@ commands =
{posargs}"
[testenv:cover]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source kayobe --parallel-mode
@ -117,7 +112,6 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/requirements.txt
@ -127,7 +121,6 @@ commands =
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
deps = {[testenv:docs]deps}
commands =
@ -136,11 +129,9 @@ commands =
make -C doc/build/pdf
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/requirements.txt

View File

@ -19,6 +19,10 @@
parent: openstack-tox-with-sudo
vars:
tox_envlist: ansible
required-projects:
- name: openstack/requirements
# TODO(mgoddard): Remove when Ansible playbooks support Python 3.
override-checkout: stable/train
irrelevant-files:
- ^.*\.rst$
- ^doc/.*
@ -54,13 +58,13 @@
- name: openstack/kayobe
- name: openstack/kayobe-config-dev
- name: openstack/kolla
# TODO(wszumski): Remove when kayobe stable/train exists.
# TODO(mgoddard): Remove when Ansible playbooks support Python 3.
override-checkout: stable/train
- name: openstack/kolla-ansible
# TODO(wszumski): Remove when kayobe stable/train exists.
# TODO(mgoddard): Remove when Ansible playbooks support Python 3.
override-checkout: stable/train
- name: openstack/requirements
# TODO(wszumski): Remove when kayobe stable/train exists.
# TODO(mgoddard): Remove when Ansible playbooks support Python 3.
override-checkout: stable/train
- name: openstack/tenks
irrelevant-files:

View File

@ -2,9 +2,7 @@
- project:
templates:
- openstack-cover-jobs
- openstack-python35-jobs
- openstack-python36-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check: