From bd7d991309ea2bea5d175cb1f2710519936fd0c2 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 28 Aug 2018 17:01:07 +0100 Subject: [PATCH] Don't use '_TransactionContextManager._async' In commit 2d532963, all instances of 'async' were replaced with 'async_' in preparation for Python 3.7. However, one of these should not have been changed as it refers to an oslo.db object attribute. That attribute has actually been renamed itself but that rename is only present from oslo.db 4.40.0 [1]. Thankfully, an alias to the older name is provided so we use that. [1] https://github.com/openstack/oslo.db/commit/df6bf34 Change-Id: I1afd0ba34a9ebcb63edb91e880ef60580befb32e Closes-Bug: #1788833 --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 59f0a8c292..a67747e408 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -202,7 +202,7 @@ def select_db_reader_mode(f): use_slave = keyed_args.get('use_slave', False) if use_slave: - reader_mode = get_context_manager(context).async_ + reader_mode = get_context_manager(context).async else: reader_mode = get_context_manager(context).reader