summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-07-16 12:08:44 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-07-29 16:37:44 +0100
commit8d7607266c51d91b289526cd571d70993c278c8f (patch)
treeef5d3212c4ec418f10d81774d661182a2b38afdc /doc/source
parent4c1eb966c08d29214c1905e74965f4109f41b013 (diff)
downloadoslo-db-8d7607266c51d91b289526cd571d70993c278c8f.tar.gz
Remove legacy calling style of select()
Resolve the following SADeprecationWarning warning: The legacy calling style of select() is deprecated and will be removed in SQLAlchemy 2.0. Please use the new calling style described at select(). Change-Id: Ic5f7240e790425d2689c6870483748650a49bc3d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/user/usage.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/source/user/usage.rst b/doc/source/user/usage.rst
index 2fe883c..8037e0c 100644
--- a/doc/source/user/usage.rst
+++ b/doc/source/user/usage.rst
@@ -84,7 +84,7 @@ is preferred:
@enginefacade.reader.connection
def _refresh_from_db(context, cache):
- sel = sa.select([table.c.id, table.c.name])
+ sel = sa.select(table.c.id, table.c.name)
res = context.connection.execute(sel).fetchall()
cache.id_cache = {r[1]: r[0] for r in res}
cache.str_cache = {r[0]: r[1] for r in res}