From 6cc6c9ba4f4493373e189d3064388d863082e9b0 Mon Sep 17 00:00:00 2001 From: Shubham82 Date: Mon, 24 Jun 2019 15:59:23 +0530 Subject: [PATCH] Switch python3 versions of test jobs to match Train PTI In Train, we will use python 3.6 and 3.7 for python3 runtime in our gate jobs [1]. This commit also adds python 3.7. In Python3.7 async is a reserved keyword so replacing it with is_async. [1] https://governance.openstack.org/tc/reference/runtimes/train.html Change-Id: I05f40c4a9304cad551cefd4f10c3ba9a72d69a6f --- .zuul.yaml | 2 +- docker/monasca-api.conf.j2 | 2 +- monasca_api/common/messaging/kafka_publisher.py | 2 +- monasca_api/conf/kafka.py | 2 +- setup.cfg | 1 + tox.ini | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 690c8c732..a92947716 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -146,7 +146,7 @@ - openstack-cover-jobs - openstack-lower-constraints-jobs - openstack-python-jobs - - openstack-python36-jobs + - openstack-python3-train-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: diff --git a/docker/monasca-api.conf.j2 b/docker/monasca-api.conf.j2 index e477efc60..33ca2683c 100644 --- a/docker/monasca-api.conf.j2 +++ b/docker/monasca-api.conf.j2 @@ -443,7 +443,7 @@ max_retry = 1 # # The type of posting # (boolean value) -async = true +is_async = true # # Specify if the message received should be parsed. diff --git a/monasca_api/common/messaging/kafka_publisher.py b/monasca_api/common/messaging/kafka_publisher.py index 48f985536..a874e58a9 100644 --- a/monasca_api/common/messaging/kafka_publisher.py +++ b/monasca_api/common/messaging/kafka_publisher.py @@ -36,7 +36,7 @@ class KafkaPublisher(publisher.Publisher): self.topic = topic self.group = cfg.CONF.kafka.group self.wait_time = cfg.CONF.kafka.wait_time - self.async_ = cfg.CONF.kafka.async + self.is_async = cfg.CONF.kafka.is_async self.ack_time = cfg.CONF.kafka.ack_time self.max_retry = cfg.CONF.kafka.max_retry self.auto_commit = cfg.CONF.kafka.auto_commit diff --git a/monasca_api/conf/kafka.py b/monasca_api/conf/kafka.py index cea9c0bf4..2e682a922 100644 --- a/monasca_api/conf/kafka.py +++ b/monasca_api/conf/kafka.py @@ -60,7 +60,7 @@ The number of retry when there is a connection error advanced=True, help=''' Should messages be automatically committed '''), - cfg.BoolOpt('async', default=True, + cfg.BoolOpt('is_async', default=True, help=''' The type of posting '''), diff --git a/setup.cfg b/setup.cfg index 5f63ffabb..794b7ef54 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 [files] packages = diff --git a/tox.ini b/tox.ini index 7724b5c36..0c759f66c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,pep8,cover +envlist = py27,py37,pep8,cover minversion = 2.7 skipsdist = True