From 2abee24a02a439de39ddf88a5688093fc5969e14 Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 27 Apr 2022 13:46:31 +0800 Subject: [PATCH] Add python3.8 requirement According to the QA's request[1], we should drop the python3.6 support in Zed cycle, and add the requirement to python3.8. [1]:http://lists.openstack.org/pipermail/openstack-discuss/2022-April/028321.html Change-Id: I772621f28d723c88e227edd3b540ce133ea3feb2 --- .zuul.yaml | 8 +++++--- requirements.txt | 4 ++-- setup.cfg | 9 +++++++-- zaqar/storage/utils.py | 7 ++++++- zaqar/tests/etc/wsgi_sqlalchemy_pooled.conf | 3 ++- zaqar/transport/websocket/factory.py | 3 +++ 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 88d7d1300..14ae1bec3 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -75,10 +75,12 @@ - project: templates: - - check-requirements - - openstack-python3-ussuri-jobs - - periodic-stable-jobs + - openstack-python3-zed-jobs + - openstack-python3-zed-jobs-arm64 - publish-openstack-docs-pti + - periodic-stable-jobs + - check-requirements + - integrated-gate-storage - release-notes-jobs-python3 check: jobs: diff --git a/requirements.txt b/requirements.txt index 965276098..1d5b0092c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ msgpack>=1.0.0 # Apache-2.0 python-memcached>=1.56 # PSF python-swiftclient>=3.10.1 # Apache-2.0 WebOb>=1.7.1 # MIT -stevedore>=1.20.0 # Apache-2.0 +stevedore>=3.2.2 # Apache-2.0 oslo.cache>=1.26.0 # Apache-2.0 oslo.config>=6.8.0 # Apache-2.0 oslo.context>=2.19.2 # Apache-2.0 @@ -29,6 +29,6 @@ oslo.utils>=3.33.0 # Apache-2.0 oslo.policy>=3.6.0 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0 SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.3.19 # MIT -autobahn>=20.7.1 # MIT License +autobahn>=22.3.2 # MIT License requests>=2.25.0 # Apache-2.0 futurist>=1.2.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index f7ea71fed..8d2fbf67a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description_file = author = OpenStack author_email = openstack-discuss@lists.openstack.org home_page = https://docs.openstack.org/zaqar/latest/ +python_requires = >=3.8 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,10 +14,14 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 +project_urls: + Source=https://opendev.org/openstack/zaqar + Tracker=https://bugs.launchpad.net/zaqar [files] packages = diff --git a/zaqar/storage/utils.py b/zaqar/storage/utils.py index ec2fbb877..3aac36344 100644 --- a/zaqar/storage/utils.py +++ b/zaqar/storage/utils.py @@ -86,7 +86,12 @@ def load_storage_impl(uri, control_mode=False, default_store=None): mode = 'control' if control_mode else 'data' driver_type = 'zaqar.{0}.storage'.format(mode) - storage_type = urllib_parse.urlparse(uri).scheme or default_store + # Note(wanghao): In python3.9, urlparse will return 'localhost' as scheme + # instead of '' in python3.8 when uri string is 'localhost:xxxxx'. So there + # need to handle this change. + storage_type = urllib_parse.urlparse(uri).scheme + if storage_type == '' or storage_type == 'localhost': + storage_type = default_store try: mgr = driver.DriverManager(driver_type, storage_type, diff --git a/zaqar/tests/etc/wsgi_sqlalchemy_pooled.conf b/zaqar/tests/etc/wsgi_sqlalchemy_pooled.conf index 7b5473268..ab38b3561 100644 --- a/zaqar/tests/etc/wsgi_sqlalchemy_pooled.conf +++ b/zaqar/tests/etc/wsgi_sqlalchemy_pooled.conf @@ -5,7 +5,8 @@ enable_deprecated_api_versions = 1,1.1 [drivers] transport = wsgi -message_store = sqlalchemy +message_store = mongodb +management_store = sqlalchemy [drivers:transport:wsgi] bind = 0.0.0.0 diff --git a/zaqar/transport/websocket/factory.py b/zaqar/transport/websocket/factory.py index a5f79edeb..9eb3a0733 100644 --- a/zaqar/transport/websocket/factory.py +++ b/zaqar/transport/websocket/factory.py @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +import txaio +txaio.use_asyncio() + from autobahn.asyncio import websocket import msgpack from oslo_serialization import jsonutils