[ussuri][goal] Drop python 2.7 support and testing

OpenStack is dropping the py2.7 support in ussuri cycle.

designate-dashboard is ready with python 3 and ok to drop the
python 2.7 support.

Also changing tox path to py3 to fix gate.
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/

Co-Authored-By: Vishal Manchanda <manchandavishal143@gmail.com>
Change-Id: Id734dd4772ee4476ae1cfa8fb3c3e4b81109a113
This commit is contained in:
Ghanshyam Mann 2019-11-15 03:42:43 +00:00 committed by manchandavishal
parent 38227c722f
commit 95dbf83346
8 changed files with 11 additions and 15 deletions

View File

@ -5,7 +5,6 @@
- horizon-nodejs10-jobs - horizon-nodejs10-jobs
- openstack-cover-jobs-horizon - openstack-cover-jobs-horizon
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-python-jobs-horizon
- openstack-python3-ussuri-jobs-horizon - openstack-python3-ussuri-jobs-horizon
- publish-openstack-docs-pti - publish-openstack-docs-pti
- release-notes-jobs-python3 - release-notes-jobs-python3

View File

@ -20,7 +20,7 @@ var path = require('path');
module.exports = function (config) { module.exports = function (config) {
// This tox venv is setup in the post-install npm step // This tox venv is setup in the post-install npm step
var toxPath = '.tox/py27/lib/python2.7/site-packages/'; var toxPath = '.tox/py36/lib/python3.6/site-packages/';
var xstaticPath = toxPath + 'xstatic/pkg/'; var xstaticPath = toxPath + 'xstatic/pkg/';
config.set({ config.set({

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Copyright 2014 Hewlett-Packard Development Company, L.P. # Copyright 2014 Hewlett-Packard Development Company, L.P.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # Licensed under the Apache License, Version 2.0 (the "License"); you may

View File

@ -16,7 +16,7 @@
"karma-ng-html2js-preprocessor": "1.0.0" "karma-ng-html2js-preprocessor": "1.0.0"
}, },
"scripts": { "scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi", "postinstall": "if [ ! -d .venv ]; then tox -epy36 --notest; fi",
"lint": "eslint --no-color designatedashboard/static", "lint": "eslint --no-color designatedashboard/static",
"lintq": "eslint --quiet designatedashboard/static", "lintq": "eslint --quiet designatedashboard/static",
"test": "karma start karma.conf.js --single-run" "test": "karma start karma.conf.js --single-run"

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of designate-dashboard
to support python 2.7 is OpenStack Train. The minimum version of Python now
supported by designate-dashboard is Python 3.6.

View File

@ -13,8 +13,6 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7

View File

@ -10,7 +10,6 @@ pylint==1.4.5 # GPLv2
testrepository>=0.0.18 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
unittest2>=1.1.0 # BSD unittest2>=1.1.0 # BSD
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,>=1.6.2;python_version>='3.4' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.18.1 # Apache-2.0 openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0

10
tox.ini
View File

@ -1,9 +1,10 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
envlist = py27,py37,py3-{dj111,dj22},pep8 envlist = py37,py3-{dj111,dj22},pep8
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1 NOSE_WITH_OPENSTACK=1
@ -26,15 +27,12 @@ commands =
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 commands = flake8
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = commands =
coverage erase coverage erase
coverage run {toxinidir}/manage.py test designatedashboard --settings=designatedashboard.tests.settings {posargs} coverage run {toxinidir}/manage.py test designatedashboard --settings=designatedashboard.tests.settings {posargs}
@ -42,12 +40,10 @@ commands =
coverage html --include 'designatedashboard/*' -d cover coverage html --include 'designatedashboard/*' -d cover
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
envdir = {toxworkdir}/docs envdir = {toxworkdir}/docs
whitelist_externals = whitelist_externals =
@ -67,11 +63,9 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes,node_modules exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes,node_modules
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints] [testenv:lower-constraints]
basepython = python3
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt