From 62bfa6af46d1091bc1457a42daf6c5315f3bd5d6 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Sun, 26 Jan 2020 22:00:58 +0100 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. sahara plugins do works with python 3 and the sahara core does not support python 2.7 anymore anyway. 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 Also: - bump the lower-constraints decorator requirements to a recent one to prevent failures; - drop the obsolete jenkins tox target. Change-Id: I5806dcb8f13e88a28c0b5e6de449efa9b95b6e73 --- .zuul.yaml | 1 - lower-constraints.txt | 2 +- .../notes/drop-py2-7-862abe2ec0c32c5f.yaml | 6 +++++ setup.cfg | 2 -- tox.ini | 22 +++++-------------- 5 files changed, 13 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/drop-py2-7-862abe2ec0c32c5f.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 073d5af8..6aeda989 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,7 +2,6 @@ templates: - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - check-requirements diff --git a/lower-constraints.txt b/lower-constraints.txt index ce64b901..34290c96 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -7,7 +7,7 @@ cmd2==0.8.0 coverage==4.0 cryptography==2.1 debtcollector==1.2.0 -decorator==3.4.0 +decorator==4.4.0 deprecation==1.0 dogpile.cache==0.6.2 extras==1.0.0 diff --git a/releasenotes/notes/drop-py2-7-862abe2ec0c32c5f.yaml b/releasenotes/notes/drop-py2-7-862abe2ec0c32c5f.yaml new file mode 100644 index 00000000..f7fea3c0 --- /dev/null +++ b/releasenotes/notes/drop-py2-7-862abe2ec0c32c5f.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of python-saharaclient + to support python 2.7 is OpenStack Train. The minimum version of Python now + supported by python-saharaclient is Python 3.6. diff --git a/setup.cfg b/setup.cfg index f86f8a8c..704b62c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,8 +14,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 c1c11041..e9fdad6d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,13 @@ [tox] -envlist = py27,py37,pypy,pep8,releasenotes -minversion = 2.0 +envlist = py37,pypy,pep8,releasenotes +minversioon = 3.1.1 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 {opts} {packages} setenv = @@ -23,16 +27,11 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY basepython = python3 commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} -[testenv:debug-py27] -basepython = python2.7 -commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} - [testenv:debug-py36] basepython = python3.6 commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source saharaclient --parallel-mode @@ -45,16 +44,11 @@ commands = coverage xml -o cover/coverage.xml coverage report -[tox:jenkins] -sitepackages = False - [testenv:pep8] -basepython = python3 sitepackages = False commands = flake8 [testenv:doc8] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -63,11 +57,9 @@ deps = commands = doc8 doc/source [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -77,7 +69,6 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -95,7 +86,6 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools local-check-factory = saharaclient.tests.hacking.checks.factory [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt