From 3cd2fec23064fb8e2abe7062e72ab22efca6b2c8 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Thu, 24 Oct 2019 22:01:43 -0700 Subject: [PATCH] Drop python2.7 support As per the official python support timeline set forth by the OpenStack TC [1], OpenStack Train (in our case, manila-ui 2.19.x series) is the last release that will support python2.7. Depends-On: https://review.opendev.org/#/c/688997/ [1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html Change-Id: I5b4dc1853d7e4f8f736dd2a22eb08bcfdeac3411 --- .zuul.yaml | 1 - doc/source/contributor/testing.rst | 14 ++++---------- .../drop-python2-support-8f7cbc2c3a758777.yaml | 7 +++++++ setup.cfg | 2 -- tox.ini | 15 ++------------- 5 files changed, 13 insertions(+), 26 deletions(-) create mode 100644 releasenotes/notes/drop-python2-support-8f7cbc2c3a758777.yaml diff --git a/.zuul.yaml b/.zuul.yaml index d1056684..7bb14577 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -4,7 +4,6 @@ - horizon-non-primary-django-jobs - openstack-cover-jobs-horizon - openstack-lower-constraints-jobs-horizon - - openstack-python-jobs-horizon - openstack-python3-ussuri-jobs-horizon - publish-openstack-docs-pti - release-notes-jobs-python3 diff --git a/doc/source/contributor/testing.rst b/doc/source/contributor/testing.rst index 3876d6c5..9f282e3a 100644 --- a/doc/source/contributor/testing.rst +++ b/doc/source/contributor/testing.rst @@ -27,17 +27,11 @@ This is made possible by the dependency in test-requirements.txt upon the horizon source, which pulls down all of the horizon and openstack_dashboard modules that the plugin uses. -To run only py27 unit tests, use following command:: +To run only py3 unit tests, use following command:: - $ tox -e py27 - -To run only py34 unit tests, use following command:: - - $ tox -e py34 + $ tox -e py3 To run unit tests using specific Django version use the following:: - $ tox -e py27dj17 - $ tox -e py27dj18 - $ tox -e py27dj19 - $ tox -e py27dj110 + $ tox -e py3-dj22 + $ tox -e py3-dj110 diff --git a/releasenotes/notes/drop-python2-support-8f7cbc2c3a758777.yaml b/releasenotes/notes/drop-python2-support-8f7cbc2c3a758777.yaml new file mode 100644 index 00000000..0153b295 --- /dev/null +++ b/releasenotes/notes/drop-python2-support-8f7cbc2c3a758777.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The last release of + openstack/manila-ui to support py2.7 is OpenStack Train (2.19.x). The + minimum version of Python now supported by openstack/manila-ui is + Python 3.6. diff --git a/setup.cfg b/setup.cfg index f727f1da..a834576c 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 93f2b971..6e61b1b2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] minversion = 1.6 -envlist = py27,py37,pep8,py3-{dj111,dj22} +envlist = py37,pep8,py3-{dj111,dj22} skipsdist = True [testenv] +basepython = python3 install_command = pip install {opts} {packages} usedevelop = True setenv = @@ -16,9 +17,6 @@ commands = dj22: pip install django>=2.2,<2.3 /bin/bash run_tests.sh -N --no-pep8 {posargs} -[testenv:py27] -setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings - [testenv:py36] setenv = DJANGO_SETTINGS_MODULE=manila_ui.tests.settings @@ -40,23 +38,18 @@ setenv = INTEGRATION_TESTS=1 SELENIUM_HEADLESS=1 HORIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf -basepython = python2.7 commands = {envpython} {toxinidir}/manage.py test manila_ui --settings=manila_ui.tests.settings --tag integration [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 commands = {toxinidir}/tools/cover.sh {posargs} [testenv:docs] -basepython = python3 whitelist_externals = rm commands = rm -rf doc/build @@ -64,7 +57,6 @@ commands = [testenv:pdf-docs] usedevelop = True -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -77,12 +69,10 @@ commands = make -C doc/build/pdf [testenv:releasenotes] -basepython = python3 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] @@ -96,7 +86,6 @@ enable-extensions = H203,H106 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt