Fix the python 3 support and drop python 2 and 3.5

OpenStack is dropping the py2.7 and py3.5 support in ussuri cycle.

python-tempestconf is python 3 ready and ok to drop the python 2.7
and python 3.5 support. Last python-tempestconf version officially supporting
python 2.7 and python 3.5 is 2.5.0

From now on, python-tempestconf will test all stable branches with py3
jobs.
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

The patch disables swift service for queens job only due to swift issues
on py3 in queens.

Story: 2007107
Task: 38163
Task: 38164

Change-Id: I0d38195f0cfbdf52a0a7e7ec721cfa9a3e2c6ea8
This commit is contained in:
Martin Kopec 2020-01-20 14:14:58 +00:00
parent 1f6749ebf3
commit 33f0d1e9db
6 changed files with 34 additions and 64 deletions

View File

@ -1,8 +1,6 @@
- project: - project:
templates: templates:
- openstack-cover-jobs - openstack-cover-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs - openstack-python36-jobs
- openstack-python37-jobs - openstack-python37-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
@ -14,9 +12,7 @@
- python-tempestconf-tempest-devstack-admin-stein - python-tempestconf-tempest-devstack-admin-stein
- python-tempestconf-tempest-devstack-admin-rocky - python-tempestconf-tempest-devstack-admin-rocky
- python-tempestconf-tempest-devstack-admin-queens - python-tempestconf-tempest-devstack-admin-queens
- python-tempestconf-tempest-devstack-admin-py3
- python-tempestconf-tempest-devstack-demo - python-tempestconf-tempest-devstack-demo
- python-tempestconf-tempest-devstack-demo-py3
- python-tempestconf-tempest-packstack-admin: - python-tempestconf-tempest-packstack-admin:
voting: false voting: false
- python-tempestconf-tempest-packstack-demo: - python-tempestconf-tempest-packstack-demo:
@ -32,9 +28,7 @@
- python-tempestconf-tempest-devstack-admin-stein - python-tempestconf-tempest-devstack-admin-stein
- python-tempestconf-tempest-devstack-admin-rocky - python-tempestconf-tempest-devstack-admin-rocky
- python-tempestconf-tempest-devstack-admin-queens - python-tempestconf-tempest-devstack-admin-queens
- python-tempestconf-tempest-devstack-admin-py3
- python-tempestconf-tempest-devstack-demo - python-tempestconf-tempest-devstack-demo
- python-tempestconf-tempest-devstack-demo-py3
- python-tempestconf-tempest-packstack-admin: - python-tempestconf-tempest-packstack-admin:
voting: false voting: false
- python-tempestconf-tempest-packstack-demo: - python-tempestconf-tempest-packstack-demo:
@ -75,15 +69,17 @@
'{{ devstack_base_dir }}/tempest/tempest.log': logs '{{ devstack_base_dir }}/tempest/tempest.log': logs
'{{ devstack_base_dir }}/tempest/etc/tempest.conf': logs '{{ devstack_base_dir }}/tempest/etc/tempest.conf': logs
'{{ zuul.project.src_dir }}/etc/accounts.yaml': logs '{{ zuul.project.src_dir }}/etc/accounts.yaml': logs
tempestconf_pip_virtualenv_python: "python3"
devstack_plugins: devstack_plugins:
heat: https://opendev.org/openstack/heat heat: https://opendev.org/openstack/heat
manila: https://opendev.org/openstack/manila manila: https://opendev.org/openstack/manila
manila-ui: https://opendev.org/openstack/manila-ui manila-ui: https://opendev.org/openstack/manila-ui
designate: https://opendev.org/openstack/designate designate: https://opendev.org/openstack/designate
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
MANILA_USE_UWSGI: False MANILA_USE_UWSGI: False
MANILA_USE_MOD_WSGI: False MANILA_USE_MOD_WSGI: False
devstack_services: devstack_services: &devstack_services
h-eng: True h-eng: True
h-api: True h-api: True
h-api-cfn: True h-api-cfn: True
@ -191,6 +187,13 @@
override-checkout: stable/queens override-checkout: stable/queens
vars: vars:
branch: stable/queens branch: stable/queens
devstack_services:
<<: *devstack_services
# disable Swift services
s-account: false
s-container: false
s-object: false
s-proxy: false
- job: - job:
name: python-tempestconf-tempest-devstack-demo name: python-tempestconf-tempest-devstack-demo
@ -238,6 +241,13 @@
override-checkout: stable/queens override-checkout: stable/queens
vars: vars:
branch: stable/queens branch: stable/queens
devstack_services:
<<: *devstack_services
# disable Swift services
s-account: false
s-container: false
s-object: false
s-proxy: false
- job: - job:
name: python-tempestconf-tempest-packstack-admin name: python-tempestconf-tempest-packstack-admin
@ -258,39 +268,3 @@
user: demo user: demo
test_demo: true test_demo: true
cloud_admin: packstack-admin cloud_admin: packstack-admin
- job:
name: python-tempestconf-tempest-devstack-admin-py3
parent: python-tempestconf-tempest-devstack-admin
description: |
Tempest job for python-tempestconf on a devstack environment with python3 enabled.
vars:
tempestconf_pip_virtualenv_python: "python3"
devstack_localrc:
USE_PYTHON3: true
devstack_services:
s-account: false
s-container: false
s-object: false
s-proxy: false
# without Swift, c-bak cannot run (in the Gate at least)
c-bak: false
- job:
name: python-tempestconf-tempest-devstack-demo-py3
parent: python-tempestconf-tempest-devstack-demo
description: |
Tempest job for python-tempestconf on a devstack environment with python3 enabled
for demo users.
vars:
aditional_tempestconf_params: "auth.tempest_roles member"
tempestconf_pip_virtualenv_python: "python3"
devstack_localrc:
USE_PYTHON3: true
devstack_services:
s-account: false
s-container: false
s-object: false
s-proxy: false
# without Swift, c-bak cannot run (in the Gate at least)
c-bak: false

View File

@ -66,7 +66,7 @@ If you've made any changes in the documentation (under ``doc/``) run::
If you've made any changes in the source code run unit tests as follows:: If you've made any changes in the source code run unit tests as follows::
$ tox -epy27 $ tox -epy36
and **pep8** check like following:: and **pep8** check like following::

View File

@ -21,16 +21,10 @@ Git
4. *(optional)* Instead of manual installation described in steps 2 and 3 4. *(optional)* Instead of manual installation described in steps 2 and 3
above, tox can be used for installing the requirements as well. above, tox can be used for installing the requirements as well.
To create python 2.7 environment run following:: To create python 3.6 environment run following::
$ tox -epy27
$ source .tox/py27/bin/activate
and python 3.5 environment can be created as follows::
$ tox -epy35
$ source .tox/py35/bin/activate
$ tox -epy36
$ source .tox/py36/bin/activate
RPM Installation (RDO) RPM Installation (RDO)
---------------------- ----------------------

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Python 2.7 and python 3.5 support have been dropped. Last release
of python-tempestconf to support python 2.7 and python 3.5 is
python-tempestconf 2.5.0. The minimum version of Python now supported
by python-tempestconf is Python 3.6.

View File

@ -13,10 +13,7 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
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.5
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
[files] [files]

14
tox.ini
View File

@ -1,9 +1,13 @@
[tox] [tox]
minversion = 2.0 minversion = 3.1.1
envlist = py37,py36,py35,py27,pypy,pep8 envlist = py37,py36,pypy,pep8
skipsdist = True skipsdist = True
# this allows tox to infer the base python from the environment name
# and override any basepython configured in this file
ignore_basepython_conflict = true
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv = setenv =
@ -18,15 +22,12 @@ commands =
stestr --test-path ./config_tempest/tests run {posargs} stestr --test-path ./config_tempest/tests run {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source config_tempest --parallel-mode PYTHON=coverage run --source config_tempest --parallel-mode
@ -40,18 +41,15 @@ commands =
coverage report coverage report
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html doc/source doc/build/html commands = sphinx-build -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[flake8] [flake8]