From aa2bdc68e66a8a10b19399bd06b13969ef40f3cc Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Sun, 17 Nov 2019 14:25:02 +0000 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. sahara-dashboard 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Depends-On: https://review.opendev.org/#/c/693631/ Change-Id: I9bbca7e2d317090dc2d05d08ccf8c45206cd160c --- .zuul.yaml | 3 ++- doc/requirements.txt | 1 - .../notes/drop-py-2-7-0812be5ce1752d7c.yaml | 6 ++++++ setup.cfg | 2 -- tox.ini | 19 +++++-------------- 5 files changed, 13 insertions(+), 18 deletions(-) create mode 100644 releasenotes/notes/drop-py-2-7-0812be5ce1752d7c.yaml diff --git a/.zuul.yaml b/.zuul.yaml index da567fc6..12af84c6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,7 +3,6 @@ - check-requirements - horizon-non-primary-django-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs-horizon - openstack-python3-ussuri-jobs-horizon - release-notes-jobs-python3 experimental: @@ -45,6 +44,8 @@ devstack_services: horizon: true tls-proxy: false + devstack_localrc: + USE_PYTHON3: True pre-run: playbooks/sahara-dashboard-integration/pre.yaml run: playbooks/sahara-dashboard-integration/run.yaml irrelevant-files: diff --git a/doc/requirements.txt b/doc/requirements.txt index 25b3d6eb..ffe9e3c5 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,7 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -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;python_version>='3.4' # BSD openstackdocstheme>=1.20.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 diff --git a/releasenotes/notes/drop-py-2-7-0812be5ce1752d7c.yaml b/releasenotes/notes/drop-py-2-7-0812be5ce1752d7c.yaml new file mode 100644 index 00000000..ced2521d --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-0812be5ce1752d7c.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of sahara-dashboard + to support python 2.7 is OpenStack Train. The minimum version of Python now + supported by sahara-dashboard is Python 3.6. diff --git a/setup.cfg b/setup.cfg index ab8c3a4e..fe0b8fd3 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 e63f5de7..c273b4f2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] minversion = 2.0 -envlist = py3-{dj111,dj22},py27,py37,pep8 +envlist = py3-{dj111,dj22},py37,pep8 skipsdist = True [testenv] +basepython = python3 usedevelop = True install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} @@ -15,28 +16,23 @@ commands = dj22: pip install django>=2.2,<2.3 {envpython} {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --exclude-tag integration {posargs} -[testenv:py27] -setenv = - DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings - [testenv:py36] +basepython = python3.6 setenv = DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings [testenv:py37] +basepython = python3.7 setenv = DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} -[testenv:py27integration] -basepython = python2.7 +[testenv:integration] passenv = AVCONV_INSTALLED setenv = INTEGRATION_TESTS=1 @@ -45,13 +41,11 @@ setenv = commands = {envpython} {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --verbosity 2 --tag integration {posargs} [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:cover] -basepython = python3 commands = coverage erase coverage run {toxinidir}/manage.py test --settings=sahara_dashboard.test.settings --exclude-tag integration {posargs} @@ -59,7 +53,6 @@ commands = coverage xml -o cover/coverage.xml [testenv:debug] -basepython = python3 commands = oslo_debug_helper -t sahara_dashboard/test {posargs} [flake8] @@ -72,7 +65,6 @@ builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,.tmp [testenv:bindep] -basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed @@ -81,7 +73,6 @@ deps = bindep commands = bindep test [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt