Merge "db: Don't use legacy 'Row()' methods"

This commit is contained in:
Zuul 2021-11-25 19:50:01 +00:00 committed by Gerrit Code Review
commit 4a359d576d
2 changed files with 1 additions and 13 deletions

View File

@ -600,7 +600,7 @@ def _compute_node_fetchall(context, filters=None, limit=None, marker=None):
results = conn.execute(select).fetchall()
# Callers expect dict-like objects, not SQLAlchemy RowProxy objects...
results = [dict(r) for r in results]
results = [dict(r._mapping) for r in results]
conn.close()
return results

View File

@ -865,18 +865,6 @@ class WarningsFixture(fixtures.Fixture):
message=r'The Column.copy\(\) method is deprecated .*',
category=sqla_exc.SADeprecationWarning)
warnings.filterwarnings(
'ignore',
module='nova',
message=r'The Row.keys\(\) method is considered legacy .*',
category=sqla_exc.SADeprecationWarning)
warnings.filterwarnings(
'ignore',
module='nova',
message=r'Using non-integer/slice indices on Row is deprecated .*',
category=sqla_exc.SADeprecationWarning)
warnings.filterwarnings(
'ignore',
module='nova',