summaryrefslogtreecommitdiff
path: root/oslo_db
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2020-03-27 19:12:05 +0100
committerAndreas Jaeger <jaegerandi@gmail.com>2020-03-30 11:57:43 +0000
commit4e6fe7cf7d9cce02343ecf0d418ca388ecb2d84d (patch)
tree2c1520433135201107821a1736753297afc59329 /oslo_db
parentbf5b45ebba24b4c8737c3197f2cd65f84fd2448c (diff)
downloadoslo-db-4e6fe7cf7d9cce02343ecf0d418ca388ecb2d84d.tar.gz
Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. blacklist: W504 line break after binary operator Fix: E305 expected 2 blank lines after class or function definition, found 1 Change-Id: I56d62f67914f07e7aef74f857c4b42e3bfd3416e
Diffstat (limited to 'oslo_db')
-rw-r--r--oslo_db/sqlalchemy/enginefacade.py1
-rw-r--r--oslo_db/sqlalchemy/exc_filters.py1
-rw-r--r--oslo_db/sqlalchemy/utils.py1
-rw-r--r--oslo_db/tests/sqlalchemy/base.py1
4 files changed, 4 insertions, 0 deletions
diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py
index b56883f..6a13c70 100644
--- a/oslo_db/sqlalchemy/enginefacade.py
+++ b/oslo_db/sqlalchemy/enginefacade.py
@@ -1076,6 +1076,7 @@ class _TransactionContextManager(object):
def async_compat(self):
return self.async_
+
setattr(
_TransactionContextManager,
"async", async_compat
diff --git a/oslo_db/sqlalchemy/exc_filters.py b/oslo_db/sqlalchemy/exc_filters.py
index 2d9b162..b4325a5 100644
--- a/oslo_db/sqlalchemy/exc_filters.py
+++ b/oslo_db/sqlalchemy/exc_filters.py
@@ -427,6 +427,7 @@ def _raise_for_all_others(error, match, engine_name, is_disconnect):
LOG.warn('DB exception wrapped.', exc_info=True)
raise exception.DBError(error)
+
ROLLBACK_CAUSE_KEY = 'oslo.db.sp_rollback_cause'
diff --git a/oslo_db/sqlalchemy/utils.py b/oslo_db/sqlalchemy/utils.py
index b7e101e..d1499f0 100644
--- a/oslo_db/sqlalchemy/utils.py
+++ b/oslo_db/sqlalchemy/utils.py
@@ -1026,6 +1026,7 @@ class DialectMultiFunctionDispatcher(DialectFunctionDispatcher):
"Return value not allowed for "
"multiple filtered function")
+
dispatch_for_dialect = DialectFunctionDispatcher.dispatch_for_dialect
diff --git a/oslo_db/tests/sqlalchemy/base.py b/oslo_db/tests/sqlalchemy/base.py
index e07b45c..9d8cf35 100644
--- a/oslo_db/tests/sqlalchemy/base.py
+++ b/oslo_db/tests/sqlalchemy/base.py
@@ -25,6 +25,7 @@ from oslotest import base as test_base
class Context(object):
pass
+
context = Context()