[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

Needed-By: https://review.opendev.org/#/c/714728/

Change-Id: I533f383c7289759c71cf5a4096b38c9bd7c9ac0a
This commit is contained in:
Ghanshyam Mann 2020-02-27 22:22:42 -06:00 committed by Andreas Jaeger
parent 6bdbcc8921
commit cd3c8395f8
2 changed files with 5 additions and 8 deletions

View File

@ -1,3 +1,3 @@
- project:
templates:
- python-charm-jobs
- openstack-python3-ussuri-jobs

11
tox.ini
View File

@ -2,7 +2,7 @@
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos.
[tox]
envlist = pep8,py27
envlist = pep8,py37
skipsdist = True
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
@ -21,15 +21,12 @@ install_command =
pip install {opts} {packages}
[testenv:build]
basepython = python2.7
basepython = python3
commands =
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
[testenv:py27]
basepython = python2.7
# Reactive source charms are Python3-only, but a py27 unit test target
# is required by OpenStack Governance. Remove this shim as soon as
# permitted. http://governance.openstack.org/reference/cti/python_cti.html
[testenv:py35]
basepython = python3.5
whitelist_externals = true
commands = true