summaryrefslogtreecommitdiff
path: root/oslo_db
diff options
context:
space:
mode:
Diffstat (limited to 'oslo_db')
-rw-r--r--oslo_db/sqlalchemy/update_match.py4
-rw-r--r--oslo_db/tests/fixtures.py5
2 files changed, 3 insertions, 6 deletions
diff --git a/oslo_db/sqlalchemy/update_match.py b/oslo_db/sqlalchemy/update_match.py
index 0bfcfa8..559aa78 100644
--- a/oslo_db/sqlalchemy/update_match.py
+++ b/oslo_db/sqlalchemy/update_match.py
@@ -487,7 +487,9 @@ def _update_stmt_from_query(mapper, query, values):
primary_table = inspect(query.column_descriptions[0]['entity']).local_table
where_criteria = query.whereclause
update_stmt = sql.update(
- primary_table, where_criteria,
+ primary_table,
+ ).where(
+ where_criteria,
).values(upd_values)
return update_stmt
diff --git a/oslo_db/tests/fixtures.py b/oslo_db/tests/fixtures.py
index d5552b0..8e70458 100644
--- a/oslo_db/tests/fixtures.py
+++ b/oslo_db/tests/fixtures.py
@@ -104,11 +104,6 @@ class WarningsFixture(fixtures.Fixture):
warnings.filterwarnings(
'once',
- message=r'The update.whereclause parameter will be removed .*',
- category=sqla_exc.SADeprecationWarning)
-
- warnings.filterwarnings(
- 'once',
message=r'The Engine.scalar\(\) method is considered legacy .*',
category=sqla_exc.SADeprecationWarning)