diff --git a/.zuul.yaml b/.zuul.yaml index 431cbd6f..1a78b229 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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: diff --git a/doc/requirements.txt b/doc/requirements.txt index d159f384..ea520746 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -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 diff --git a/qinling/utils/etcd_util.py b/qinling/utils/etcd_util.py index 82fa635e..833c4773 100644 --- a/qinling/utils/etcd_util.py +++ b/qinling/utils/etcd_util.py @@ -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]) diff --git a/qinling_tempest_plugin/services/qinling_client.py b/qinling_tempest_plugin/services/qinling_client.py index ee55b519..a0576aca 100644 --- a/qinling_tempest_plugin/services/qinling_client.py +++ b/qinling_tempest_plugin/services/qinling_client.py @@ -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 diff --git a/releasenotes/notes/drop-py-2-7-86062f8380134200.yaml b/releasenotes/notes/drop-py-2-7-86062f8380134200.yaml new file mode 100644 index 00000000..8ef1e399 --- /dev/null +++ b/releasenotes/notes/drop-py-2-7-86062f8380134200.yaml @@ -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. diff --git a/tox.ini b/tox.ini index f09ec0aa..3c4757fb 100644 --- a/tox.ini +++ b/tox.ini @@ -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