Drop support for python 2
Also adds support for py3.6 and py3.7 check and gate jobs. Co-authored-by: xuanyandong <xuanyandong@inspur.com> Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com> Closes-bug: #1853372 Change-Id: Ia978b692ade23ee6482957f41b17cb879c96fea7
This commit is contained in:
parent
d240091c32
commit
658de38c20
39
.zuul.yaml
39
.zuul.yaml
@ -1,5 +1,6 @@
|
|||||||
- job:
|
- job:
|
||||||
name: python-cinderclient-functional
|
name: python-cinderclient-functional-base
|
||||||
|
abstract: true
|
||||||
parent: devstack
|
parent: devstack
|
||||||
run: playbooks/python-cinderclient-functional.yaml
|
run: playbooks/python-cinderclient-functional.yaml
|
||||||
post-run: playbooks/post.yaml
|
post-run: playbooks/post.yaml
|
||||||
@ -12,19 +13,47 @@
|
|||||||
USE_PYTHON3: true
|
USE_PYTHON3: true
|
||||||
VOLUME_BACKING_FILE_SIZE: 16G
|
VOLUME_BACKING_FILE_SIZE: 16G
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: python-cinderclient-functional-py36
|
||||||
|
parent: python-cinderclient-functional-base
|
||||||
|
vars:
|
||||||
|
python_version: 3.6
|
||||||
|
tox_envlist: functional-py36
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: python-cinderclient-functional-py37
|
||||||
|
parent: python-cinderclient-functional-base
|
||||||
|
# Just to be clear what's going on here: which python is used by
|
||||||
|
# tox is controlled by tox.ini. But, that python needs to
|
||||||
|
# actually be available on the node running the job in order for
|
||||||
|
# the job to succeed. At this point, we can assume that 3.6 will
|
||||||
|
# be available everywhere (this is guaranteed by openstack-infra).
|
||||||
|
# But 3.7 is still problematic (don't ask me why). So for this
|
||||||
|
# job that we want running in py3.7, we need to (a) specify a
|
||||||
|
# nodeset for which py3.7 is available, and (b) tell the job to
|
||||||
|
# make sure it's available (i.e., install it if necessary).
|
||||||
|
# (a) is handled by the 'nodeset' specification below.
|
||||||
|
# (b) is handled by the setting the 'python_version' variable
|
||||||
|
# below, although by itself that doesn't do anything: it also
|
||||||
|
# requires that the 'ensure-python' role is included in the
|
||||||
|
# job playbook.
|
||||||
|
nodeset: openstack-single-node-bionic
|
||||||
|
vars:
|
||||||
|
python_version: 3.7
|
||||||
|
tox_envlist: functional-py37
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
templates:
|
templates:
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- lib-forward-testing
|
|
||||||
- lib-forward-testing-python3
|
- lib-forward-testing-python3
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-lower-constraints-jobs
|
- openstack-lower-constraints-jobs
|
||||||
- openstack-python-jobs
|
- openstack-python3-ussuri-jobs
|
||||||
- openstack-python3-train-jobs
|
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- python-cinderclient-functional
|
- python-cinderclient-functional-py36
|
||||||
|
- python-cinderclient-functional-py37
|
||||||
- openstack-tox-pylint:
|
- openstack-tox-pylint:
|
||||||
voting: false
|
voting: false
|
||||||
|
@ -4,5 +4,4 @@
|
|||||||
# These are needed for docs generation
|
# These are needed for docs generation
|
||||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||||
reno>=2.5.0 # Apache-2.0
|
reno>=2.5.0 # Apache-2.0
|
||||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
|
||||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
|
- ensure-python
|
||||||
- run-devstack
|
- run-devstack
|
||||||
# Run bindep and test-setup after devstack so that they won't interfere
|
# Run bindep and test-setup after devstack so that they won't interfere
|
||||||
- role: bindep
|
- role: bindep
|
||||||
@ -9,6 +10,5 @@
|
|||||||
- get-os-environment
|
- get-os-environment
|
||||||
- ensure-tox
|
- ensure-tox
|
||||||
- role: tox
|
- role: tox
|
||||||
tox_envlist: functional
|
|
||||||
tox_install_siblings: false
|
tox_install_siblings: false
|
||||||
environment: "{{ os_env_vars }}"
|
environment: "{{ os_env_vars }}"
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Python 2.7 support has been dropped. Beginning with release 6.0.0,
|
||||||
|
the minimum version of Python supported by python-cinderclient is
|
||||||
|
Python 3.6. The last version of python-cinderclient to support
|
||||||
|
Python 2.7 is the 5.x series from the Train release.
|
@ -15,8 +15,6 @@ 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.6
|
Programming Language :: Python :: 3.6
|
||||||
Programming Language :: Python :: 3.7
|
Programming Language :: Python :: 3.7
|
||||||
|
31
tox.ini
31
tox.ini
@ -1,10 +1,15 @@
|
|||||||
[tox]
|
[tox]
|
||||||
distribute = False
|
distribute = False
|
||||||
envlist = py27,py37,pep8
|
envlist = py36,py37,pep8
|
||||||
minversion = 2.0
|
minversion = 3.1.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
skip_missing_interpreters = 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 {opts} {packages}
|
install_command = pip install {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
@ -25,11 +30,9 @@ commands = find . -type f -name "*.pyc" -delete
|
|||||||
whitelist_externals = find
|
whitelist_externals = find
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@ -38,11 +41,9 @@ commands = bash tools/lintstack.sh
|
|||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
|
||||||
[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 cinderclient --parallel-mode
|
PYTHON=coverage run --source cinderclient --parallel-mode
|
||||||
@ -53,7 +54,6 @@ commands =
|
|||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@ -61,7 +61,6 @@ deps =
|
|||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
{[testenv:docs]deps}
|
{[testenv:docs]deps}
|
||||||
commands =
|
commands =
|
||||||
@ -73,7 +72,6 @@ whitelist_externals =
|
|||||||
cp
|
cp
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@ -81,24 +79,35 @@ deps =
|
|||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python3
|
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
OS_TEST_PATH = ./cinderclient/tests/functional
|
OS_TEST_PATH = ./cinderclient/tests/functional
|
||||||
OS_VOLUME_API_VERSION = 3
|
OS_VOLUME_API_VERSION = 3
|
||||||
|
# must define this here so it can be inherited by the -py3* environments
|
||||||
|
OS_CINDERCLIENT_EXEC_DIR = {envdir}/bin
|
||||||
|
|
||||||
# The OS_CACERT environment variable should be passed to the test
|
# The OS_CACERT environment variable should be passed to the test
|
||||||
# environments to specify a CA bundle file to use in verifying a
|
# environments to specify a CA bundle file to use in verifying a
|
||||||
# TLS (https) server certificate.
|
# TLS (https) server certificate.
|
||||||
passenv = OS_*
|
passenv = OS_*
|
||||||
|
|
||||||
|
[testenv:functional-py36]
|
||||||
|
setenv = {[testenv:functional]setenv}
|
||||||
|
passenv = {[testenv:functional]passenv}
|
||||||
|
commands = {[testenv:functional]commands}
|
||||||
|
|
||||||
|
[testenv:functional-py37]
|
||||||
|
setenv = {[testenv:functional]setenv}
|
||||||
|
passenv = {[testenv:functional]passenv}
|
||||||
|
commands = {[testenv:functional]commands}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = H404,H405,E122,E123,E128,E251
|
ignore = H404,H405,E122,E123,E128,E251
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
|
||||||
[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
|
||||||
|
Loading…
Reference in New Issue
Block a user