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

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

qinling 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: Icfaa8e59840406b5fddbde55a1cac67035a22935
This commit is contained in:
Ghanshyam Mann 2019-11-17 13:21:26 +00:00 committed by Lingxian Kong
parent a48673d54d
commit 40ac336d30
6 changed files with 16 additions and 11 deletions

View File

@ -53,6 +53,7 @@
qinling: https://opendev.org/openstack/qinling
devstack_localrc:
TEMPEST_PLUGINS: /opt/stack/qinling
USE_PYTHON3: True
tox_envlist: all-plugin
tempest_test_regex: ^(qinling_tempest_plugin.)
# Qinling's default replicas number is 3, some test cases need
@ -69,19 +70,16 @@
templates:
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- check-requirements
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
jobs:
- openstack-tox-pep8
- qinling-tempest
gate:
queue: qinling
jobs:
- openstack-tox-pep8
- qinling-tempest
experimental:
jobs:

View File

@ -2,8 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# this is required for the docs build jobs
sphinx>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.6.2;python_version>='3.4' # BSD
sphinx>=1.6.2 # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
reno>=1.8.0 # Apache-2.0

View File

@ -14,6 +14,7 @@
import etcd3gw
from oslo_config import cfg
from oslo_utils import encodeutils
CONF = cfg.CONF
CLIENT = None
@ -74,7 +75,7 @@ def delete_worker(function_id, worker, version=0):
def get_workers(function_id, version=0):
client = get_client()
values = client.get_prefix("%s_%s/worker" % (function_id, version))
workers = [w[0] for w in values]
workers = [encodeutils.safe_decode(w[0]) for w in values]
return workers
@ -91,4 +92,4 @@ def create_service_url(function_id, url, version=0):
def get_service_url(function_id, version=0):
client = get_client()
values = client.get('%s_%s/service_url' % (function_id, version))
return None if not values else values[0]
return None if not values else encodeutils.safe_decode(values[0])

View File

@ -163,8 +163,9 @@ class QinlingClient(client_base.QinlingClientBase):
return resp, body
def get_execution_log(self, execution_id):
return self.get('/v1/executions/%s/log' % execution_id,
headers={'Accept': 'text/plain'})
resp, body = self.get('/v1/executions/%s/log' % execution_id,
headers={'Accept': 'text/plain'})
return resp, str(body)
def get_function_workers(self, function_id, version=0):
q_params = None

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of qinling
to support python 2.7 is OpenStack Train. The minimum version of Python now
supported by qinling is Python 3.6.

View File

@ -1,7 +1,8 @@
[tox]
minversion = 2.0
minversion = 3.1.1
envlist = py37,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
@ -22,7 +23,6 @@ whitelist_externals =
commands = flake8 {posargs}
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file tools/config/config-generator.qinling.conf \
--output-file etc/qinling.conf.sample