[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
This commit is contained in:
Ghanshyam Mann 2019-11-17 14:25:02 +00:00
parent fb3782e9e0
commit aa2bdc68e6
5 changed files with 13 additions and 18 deletions

View File

@ -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:

View File

@ -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

View File

@ -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.

View File

@ -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

19
tox.ini
View File

@ -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