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

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

kolla-cli also drop py2 testing and 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

Change-Id: I44fe93012739ad190f8d0fe593e70863ab238158
This commit is contained in:
Ghanshyam Mann 2020-02-29 15:06:57 -06:00 committed by Radosław Piliszek
parent 83c66740fa
commit 3f9b0679ab
6 changed files with 12 additions and 37 deletions

View File

@ -1,18 +1,4 @@
---
- job:
name: kollacli-tox-functional-py27
parent: openstack-tox
description: |
Run tox-based py27 functional tests for the OpenStack Kolla-cli project.
Uses tox with the ``functional`` environment.
irrelevant-files:
- ^.*\.rst$
- ^doc/source/.*$
- ^releasenotes/.*$
vars:
tox_envlist: functional-py27
timeout: 3600
- job:
name: kollacli-tox-functional-py36
parent: openstack-tox

View File

@ -4,6 +4,5 @@
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinx>=1.8.0,!=2.1.0 # BSD
sphinxcontrib-pecanwsme>=0.8

View File

@ -0,0 +1,5 @@
upgrade:
- |
Python 2.7 support has been dropped. Last release of kolla-cli
to support py2.7 is OpenStack Train. The minimum version of Python now
supported by kolla-cli is Python 3.6.

View File

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

View File

@ -12,10 +12,10 @@ coverage>=4.0
doc8>=0.6.0 # Apache-2.0
fixtures>=3.0.0
mock>=2.0.0
mypy>=0.6; python_version>'2.7'
mypy>=0.6
oslo.utils>=3.33.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
pexpect>=4.0.1
testtools>=2.2.0
typing>=3.6; python_version>'2.7'
typing>=3.6

21
tox.ini
View File

@ -1,9 +1,11 @@
[tox]
minversion = 2.5.0
minversion = 3.1
skipsdist = True
envlist = py37,pep8,mypy,py27
envlist = py37,pep8,mypy
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop=True
whitelist_externals =
find
@ -25,7 +27,6 @@ commands =
stestr run {posargs}
[testenv:debug]
basepython = python3
description = Allows to run unit-test with debug mode enabled
setenv =
KOLLA_ETC = /tmp/kollaclitest/etc/kolla
@ -49,11 +50,6 @@ commands =
bash -c "pushd /tmp/kollaclitest/usr/share/kolla-ansible/git; python setup.py install; popd"
stestr run {posargs} --serial
[testenv:functional-py27]
basepython = python2.7
setenv = {[testenv:functional]setenv}
commands = {[testenv:functional]commands}
[testenv:functional-py36]
basepython = python3.6
setenv = {[testenv:functional]setenv}
@ -65,7 +61,6 @@ setenv = {[testenv:functional]setenv}
commands = {[testenv:functional]commands}
[testenv:pep8]
basepython = python3
deps = {[testenv]deps}
commands =
flake8 {posargs}
@ -73,13 +68,11 @@ commands =
{[testenv:bandit]commands}
[testenv:mypy]
basepython = python3
skip_install = true
commands =
mypy --py2 --ignore-missing-imports kolla_cli
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]
@ -87,12 +80,10 @@ show-source = True
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:bandit]
basepython = python3
# Run security linter
commands = bandit -r kolla_cli -x tests
[testenv:docs]
basepython = python3
deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
@ -101,7 +92,6 @@ commands =
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
commands =
rm -rf doc/build/pdf
@ -110,7 +100,6 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
@ -119,7 +108,6 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:cover]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
@ -133,7 +121,6 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt