Drop python 2.7 support and testing

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

ironic-ui 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://review.opendev.org/#/c/691178/

Change-Id: Iaedcd8e73871583e4dc16860a81eb7351ffae0a2
This commit is contained in:
Madhuri Kumari 2019-11-23 19:00:30 +05:30 committed by Vishal Manchanda
parent 416f424027
commit 318ed8bc9d
8 changed files with 11 additions and 19 deletions

View File

@ -27,7 +27,6 @@
- horizon-nodejs10-jobs
- horizon-non-primary-django-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -1,4 +1,3 @@
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

@ -17,7 +17,7 @@
module.exports = function (config) {
// 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/';
config.set({
preprocessors: {

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 Cisco Systems, Inc.
#

View File

@ -24,7 +24,7 @@
"karma-threshold-reporter": "^0.1.15"
},
"scripts": {
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/py27 ]; then tox -epy27 --notest; fi",
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/py36 ]; then tox -epy36 --notest; fi",
"test": "karma start ironic_ui/karma.conf.js --single-run",
"lint": "eslint --no-color ironic_ui/static",
"lintq": "eslint --quiet ironic_ui/static"

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of ironic-ui to
support Python 2.7 is OpenStack Train. The minimum version of Python
now supported by ironic-ui 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

14
tox.ini
View File

@ -1,11 +1,12 @@
[tox]
minversion = 1.8
skipsdist = True
envlist = py3,py27,py3-{dj111,dj22},pep8
envlist = py3,py3-{dj111,dj22},pep8
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
basepython = python3
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
@ -28,30 +29,24 @@ setenv =
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=ironic_ui/test/integration/horizon.conf
basepython = python3
commands = python manage.py test ironic_ui.test.integration --settings=ironic_ui.test.settings --tag integration
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:py3-dev]
basepython = python3
commands =
pip install {env:HORIZON_REPO:git+https://opendev.org/openstack/horizon}
{[testenv]commands}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
@ -59,7 +54,6 @@ commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals = make
commands =
@ -67,7 +61,6 @@ commands =
make -C doc/build/pdf
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t ironic_ui/test/tests {posargs}
[flake8]
@ -77,14 +70,12 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[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 -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:extractmessages]
basepython = python3
commands =
pybabel extract -F babel-django.cfg \
-o ironic_ui/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
@ -98,7 +89,6 @@ commands =
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt