Merge "Fix the python 3 support and drop python 2 and 3.5"

This commit is contained in:
Zuul 2020-03-03 17:10:49 +00:00 committed by Gerrit Code Review
commit 44c1634392
6 changed files with 34 additions and 64 deletions

View File

@ -1,8 +1,6 @@
- project:
templates:
- openstack-cover-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
- openstack-python37-jobs
- publish-openstack-docs-pti
@ -14,9 +12,7 @@
- python-tempestconf-tempest-devstack-admin-stein
- python-tempestconf-tempest-devstack-admin-rocky
- python-tempestconf-tempest-devstack-admin-queens
- python-tempestconf-tempest-devstack-admin-py3
- python-tempestconf-tempest-devstack-demo
- python-tempestconf-tempest-devstack-demo-py3
- python-tempestconf-tempest-packstack-admin:
voting: false
- python-tempestconf-tempest-packstack-demo:
@ -32,9 +28,7 @@
- python-tempestconf-tempest-devstack-admin-stein
- python-tempestconf-tempest-devstack-admin-rocky
- python-tempestconf-tempest-devstack-admin-queens
- python-tempestconf-tempest-devstack-admin-py3
- python-tempestconf-tempest-devstack-demo
- python-tempestconf-tempest-devstack-demo-py3
- python-tempestconf-tempest-packstack-admin:
voting: false
- python-tempestconf-tempest-packstack-demo:
@ -75,15 +69,17 @@
'{{ devstack_base_dir }}/tempest/tempest.log': logs
'{{ devstack_base_dir }}/tempest/etc/tempest.conf': logs
'{{ zuul.project.src_dir }}/etc/accounts.yaml': logs
tempestconf_pip_virtualenv_python: "python3"
devstack_plugins:
heat: https://opendev.org/openstack/heat
manila: https://opendev.org/openstack/manila
manila-ui: https://opendev.org/openstack/manila-ui
designate: https://opendev.org/openstack/designate
devstack_localrc:
USE_PYTHON3: True
MANILA_USE_UWSGI: False
MANILA_USE_MOD_WSGI: False
devstack_services:
devstack_services: &devstack_services
h-eng: True
h-api: True
h-api-cfn: True
@ -191,6 +187,13 @@
override-checkout: stable/queens
vars:
branch: stable/queens
devstack_services:
<<: *devstack_services
# disable Swift services
s-account: false
s-container: false
s-object: false
s-proxy: false
- job:
name: python-tempestconf-tempest-devstack-demo
@ -238,6 +241,13 @@
override-checkout: stable/queens
vars:
branch: stable/queens
devstack_services:
<<: *devstack_services
# disable Swift services
s-account: false
s-container: false
s-object: false
s-proxy: false
- job:
name: python-tempestconf-tempest-packstack-admin
@ -258,39 +268,3 @@
user: demo
test_demo: true
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::
$ tox -epy27
$ tox -epy36
and **pep8** check like following::

View File

@ -21,16 +21,10 @@ Git
4. *(optional)* Instead of manual installation described in steps 2 and 3
above, tox can be used for installing the requirements as well.
To create python 2.7 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
To create python 3.6 environment run following::
$ tox -epy36
$ source .tox/py36/bin/activate
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
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
[files]

14
tox.ini
View File

@ -1,9 +1,13 @@
[tox]
minversion = 2.0
envlist = py37,py36,py35,py27,pypy,pep8
minversion = 3.1.1
envlist = py37,py36,pypy,pep8
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]
basepython = python3
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv =
@ -18,15 +22,12 @@ commands =
stestr --test-path ./config_tempest/tests run {posargs}
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source config_tempest --parallel-mode
@ -40,18 +41,15 @@ commands =
coverage report
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html doc/source doc/build/html
[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:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]