summaryrefslogtreecommitdiff
path: root/oslo_db/sqlalchemy
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-07-04 00:40:44 +0000
committerGerrit Code Review <review@openstack.org>2018-07-04 00:40:44 +0000
commitdff11337f55b7a9a28d7c30658df51b7b0b443eb (patch)
tree35fe57ee6ef57f17e013b3092874038c76998724 /oslo_db/sqlalchemy
parentc49c96ff74190b9f1b1504eaa8a7ef66b8ae333f (diff)
parentdf6bf3401266f42271627c1e408f87c71a06cef7 (diff)
downloadoslo-db-dff11337f55b7a9a28d7c30658df51b7b0b443eb.tar.gz
Merge "Rename enginefacade.async to enginefacade.async_"4.40.0
Diffstat (limited to 'oslo_db/sqlalchemy')
-rw-r--r--oslo_db/sqlalchemy/enginefacade.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py
index 2b9f81e..481e166 100644
--- a/oslo_db/sqlalchemy/enginefacade.py
+++ b/oslo_db/sqlalchemy/enginefacade.py
@@ -17,6 +17,7 @@ import operator
import threading
import warnings
+import debtcollector.moves
import debtcollector.removals
import debtcollector.renames
from oslo_config import cfg
@@ -965,7 +966,7 @@ class _TransactionContextManager(object):
return self._clone(connection=True)
@property
- def async(self):
+ def async_(self):
"""Modifier to set a READER operation to ASYNC_READER."""
if self._mode is _WRITER:
@@ -1049,6 +1050,17 @@ class _TransactionContextManager(object):
transaction_contexts_by_thread.current = restore
+@property
+@debtcollector.moves.moved_property("async_")
+def async_compat(self):
+ return self.async_
+
+setattr(
+ _TransactionContextManager,
+ "async", async_compat
+)
+
+
def _context_descriptor(attr=None):
getter = operator.attrgetter(attr)