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

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

Cloudkitty 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I44ea5cfe479558969ccb3ca57f416511614626cc
This commit is contained in:
Ghanshyam Mann 2019-11-15 02:43:07 +00:00
parent 1948308523
commit afef05aca4
5 changed files with 12 additions and 58 deletions

View File

@ -28,6 +28,7 @@
tox_envlist: all tox_envlist: all
devstack_localrc: devstack_localrc:
CLOUDKITTY_FETCHER: keystone CLOUDKITTY_FETCHER: keystone
USE_PYTHON3: True
TEMPEST_PLUGINS: /opt/stack/cloudkitty-tempest-plugin TEMPEST_PLUGINS: /opt/stack/cloudkitty-tempest-plugin
- job: - job:
@ -64,68 +65,35 @@
name: cloudkitty-tempest-full-v1-storage-sqlalchemy name: cloudkitty-tempest-full-v1-storage-sqlalchemy
parent: base-cloudkitty-v1-api-tempest-job parent: base-cloudkitty-v1-api-tempest-job
description: | description: |
Job testing cloudkitty installation on devstack with python 2 and the Job testing cloudkitty installation on devstack with python 3 and the
SQLAlchemy v1 storage driver and running tempest tests SQLAlchemy v1 storage driver and running tempest tests
vars: vars:
devstack_localrc: devstack_localrc:
CLOUDKITTY_STORAGE_BACKEND: sqlalchemy CLOUDKITTY_STORAGE_BACKEND: sqlalchemy
CLOUDKITTY_STORAGE_VERSION: 1 CLOUDKITTY_STORAGE_VERSION: 1
- job:
name: cloudkitty-tempest-full-v1-storage-sqlalchemy-py3
parent: cloudkitty-tempest-full-v1-storage-sqlalchemy
description: |
Job testing cloudkitty installation on devstack with python 3 and the
SQLAlchemy v1 storage driver and running tempest tests
vars:
devstack_localrc:
DEVSTACK_GATE_USE_PYTHON3: "True"
USE_PYTHON3: "True"
- job: - job:
name: cloudkitty-tempest-full-v2-storage-influxdb name: cloudkitty-tempest-full-v2-storage-influxdb
parent: base-cloudkitty-v2-api-tempest-job parent: base-cloudkitty-v2-api-tempest-job
description: | description: |
Job testing cloudkitty installation on devstack with python 2 and the Job testing cloudkitty installation on devstack with python 3 and the
InfluxDB v2 storage driver and running tempest tests InfluxDB v2 storage driver and running tempest tests
vars: vars:
devstack_localrc: devstack_localrc:
CLOUDKITTY_STORAGE_BACKEND: influxdb CLOUDKITTY_STORAGE_BACKEND: influxdb
CLOUDKITTY_STORAGE_VERSION: 2 CLOUDKITTY_STORAGE_VERSION: 2
- job:
name: cloudkitty-tempest-full-v2-storage-influxdb-py3
parent: cloudkitty-tempest-full-v2-storage-influxdb
description: |
Job testing cloudkitty installation on devstack with python 3 and the
InfluxDB v2 storage driver and running tempest tests
vars:
devstack_localrc:
DEVSTACK_GATE_USE_PYTHON3: "True"
USE_PYTHON3: "True"
- job: - job:
name: cloudkitty-tempest-full-v2-storage-elasticsearch name: cloudkitty-tempest-full-v2-storage-elasticsearch
parent: base-cloudkitty-v2-api-tempest-job parent: base-cloudkitty-v2-api-tempest-job
description: | description: |
Job testing cloudkitty installation on devstack with python 2 and the Job testing cloudkitty installation on devstack with python 3 and the
Elasticsearch v2 storage driver and running tempest tests Elasticsearch v2 storage driver and running tempest tests
vars: vars:
devstack_localrc: devstack_localrc:
CLOUDKITTY_STORAGE_BACKEND: elasticsearch CLOUDKITTY_STORAGE_BACKEND: elasticsearch
CLOUDKITTY_STORAGE_VERSION: 2 CLOUDKITTY_STORAGE_VERSION: 2
- job:
name: cloudkitty-tempest-full-v2-storage-elasticsearch-py3
parent: cloudkitty-tempest-full-v2-storage-elasticsearch
description: |
Job testing cloudkitty installation on devstack with python 3 and the
elasticsearch v2 storage driver and running tempest tests
vars:
devstack_localrc:
DEVSTACK_GATE_USE_PYTHON3: "True"
USE_PYTHON3: "True"
- job: - job:
name: cloudkitty-tox-bandit name: cloudkitty-tox-bandit
parent: openstack-tox parent: openstack-tox
@ -154,20 +122,15 @@
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- check-requirements - check-requirements
- openstack-cover-jobs - openstack-cover-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs - openstack-python3-ussuri-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- release-notes-jobs-python3 - release-notes-jobs-python3
check: check:
jobs: jobs:
- cloudkitty-tempest-full-v2-storage-influxdb - cloudkitty-tempest-full-v2-storage-influxdb
- cloudkitty-tempest-full-v2-storage-influxdb-py3
- cloudkitty-tempest-full-v2-storage-elasticsearch: - cloudkitty-tempest-full-v2-storage-elasticsearch:
voting: false voting: false
- cloudkitty-tempest-full-v2-storage-elasticsearch-py3:
voting: false
- cloudkitty-tempest-full-v1-storage-sqlalchemy - cloudkitty-tempest-full-v1-storage-sqlalchemy
- cloudkitty-tempest-full-v1-storage-sqlalchemy-py3
- cloudkitty-tempest-full-ipv6-only - cloudkitty-tempest-full-ipv6-only
- cloudkitty-tox-bandit: - cloudkitty-tox-bandit:
voting: false voting: false
@ -175,7 +138,5 @@
queue: cloudkitty queue: cloudkitty
jobs: jobs:
- cloudkitty-tempest-full-v2-storage-influxdb - cloudkitty-tempest-full-v2-storage-influxdb
- cloudkitty-tempest-full-v2-storage-influxdb-py3
- cloudkitty-tempest-full-v1-storage-sqlalchemy - cloudkitty-tempest-full-v1-storage-sqlalchemy
- cloudkitty-tempest-full-v1-storage-sqlalchemy-py3
- cloudkitty-tempest-full-ipv6-only - cloudkitty-tempest-full-ipv6-only

View File

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

@ -12,7 +12,6 @@ gabbi>=1.26.1 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0
mock>=1.2 # BSD mock>=1.2 # 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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.30.0 # Apache-2.0 openstackdocstheme>=1.30.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0

14
tox.ini
View File

@ -1,9 +1,10 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
skipsdist = True skipsdist = True
envlist = py36,py37,py27,pep8 envlist = py36,py37,pep8
[testenv] [testenv]
basepython = python3
whitelist_externals = rm whitelist_externals = rm
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
@ -18,22 +19,18 @@ commands =
stestr run {posargs} stestr run {posargs}
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
flake8 {posargs} cloudkitty flake8 {posargs} cloudkitty
doc8 {posargs} doc8 {posargs}
[testenv:bandit] [testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r cloudkitty -n5 -x cloudkitty/tests/* -ll commands = bandit -r cloudkitty -n5 -x cloudkitty/tests/* -ll
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHON=coverage run --source cloudkitty --parallel-mode PYTHON=coverage run --source cloudkitty --parallel-mode
@ -45,20 +42,16 @@ commands =
coverage report coverage report
[testenv:genconfig] [testenv:genconfig]
basepython = python3
commands = commands =
oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf
[testenv:genpolicy] [testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf
[testenv:docs] [testenv:docs]
basepython = python3
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs envdir = {toxworkdir}/docs
whitelist_externals = whitelist_externals =
make make
@ -67,7 +60,6 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[flake8] [flake8]
@ -82,11 +74,9 @@ import_exceptions = cloudkitty.i18n
local-check-factory = cloudkitty.hacking.checks.factory local-check-factory = cloudkitty.hacking.checks.factory
[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