[ussuri][goal] Updates for python 2.7 drop

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

charm repos need few updates on either py2 drop or updating
ussuri python template, tox.ini etc.

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: Iea382a3ec4564d3bf00d16dda281673bc10cb33b
This commit is contained in:
Ghanshyam Mann 2020-02-23 21:07:50 -06:00
parent ccbac241c1
commit e661ef5303
1 changed files with 4 additions and 10 deletions

14
tox.ini
View File

@ -1,25 +1,21 @@
[tox]
envlist = pep8,py27,py34,py35
minversion = 3.1
envlist = pep8,py34,py35
skipsdist = True
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE(beisner): Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install {opts} {packages}
commands = ostestr {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
# https://github.com/juju/charm-tools/issues/249
commands = /bin/true
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt
@ -35,12 +31,10 @@ deps = -r{toxinidir}/test-requirements.txt
commands = /bin/true
[testenv:pep8]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]