From 60202d8222b3063f156af9abe5500f7c5d04f3c4 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 31 Oct 2019 07:53:50 +0000 Subject: [PATCH] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. python-senlinclient 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://review.opendev.org/#/c/691178/ Change-Id: Id86de6b06dbbf904976b6c845f6a843bbdd2a91b --- .zuul.yaml | 3 +-- .../legacy/senlinclient-dsvm-functional/run.yaml | 1 + .../notes/drop-py-2-7-cced38f13fd3b44c.yaml | 6 ++++++ setup.cfg | 2 -- tox.ini | 14 ++++---------- 5 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 398d5587..a0f5108d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -13,8 +13,7 @@ templates: - check-requirements - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs - openstackclient-plugin-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff --git a/playbooks/legacy/senlinclient-dsvm-functional/run.yaml b/playbooks/legacy/senlinclient-dsvm-functional/run.yaml index 78b7d7da..dcad7085 100644 --- a/playbooks/legacy/senlinclient-dsvm-functional/run.yaml +++ b/playbooks/legacy/senlinclient-dsvm-functional/run.yaml @@ -31,6 +31,7 @@ [[local|localrc]] enable_plugin senlin https://opendev.org/openstack/senlin enable_service sl-api sl-eng + USE_PYTHON3=True EOF executable: /bin/bash diff --git a/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml b/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml new file mode 100644 index 00000000..bc734922 --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-cced38f13fd3b44c.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of python-senlinclient + to support python 2.7 is OpenStack Train. The minimum version of Python now + supported by python-senlinclient is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 67b5a464..3cb3c6be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,8 +13,6 @@ 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.6 Programming Language :: Python :: 3.7 diff --git a/tox.ini b/tox.ini index abdd24ff..147d5e4a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,11 @@ [tox] -envlist = py27,py37,pep8,releasenotes -minversion = 2.0 +envlist = py37,pep8,releasenotes +minversion = 3.1.1 skipsdist = True +ignore_basepython_conflict = True [testenv] +basepython = python3 setenv = VIRTUAL_ENV={envdir} CLIENT_NAME=python-senlinclient usedevelop = True @@ -18,12 +20,10 @@ commands = whitelist_externals = find [testenv:bandit] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r senlinclient -x tests -n5 -ll [testenv:pep8] -basepython = python3 commands = flake8 # Check that .po and .pot files are valid: @@ -31,7 +31,6 @@ commands = whitelist_externals = bash [testenv:venv] -basepython = python3 commands = {posargs} [testenv:functional] @@ -41,7 +40,6 @@ setenv = passenv = OS_* [testenv:cover] -basepython = python3 setenv = PYTHON=coverage run --source senlinclient --parallel-mode commands = @@ -52,11 +50,9 @@ commands = coverage report [testenv:debug] -basepython = python3 commands = oslo_debug_helper -t senlinclient/tests {posargs} [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -64,7 +60,6 @@ deps = commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -82,7 +77,6 @@ max-complexity=20 import_exceptions = senlinclient.common.i18n [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt