summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-01-06 10:43:19 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-15 13:04:58 -0500
commitebbbac0a76b3327a829864afb26ee1b7ff1dc780 (patch)
treeb086b06760255bc0bb76e51624a5e3772bc4cc3d /lib/sqlalchemy/dialects/postgresql/base.py
parent6be06d85e598e4fda6f3d35084e1c5cccb30cee5 (diff)
downloadsqlalchemy-ebbbac0a76b3327a829864afb26ee1b7ff1dc780.tar.gz
update execute() arg formats in modules and tests
continuing with producing a SQLAlchemy 1.4.0b2 that internally does not emit any of its own 2.0 deprecation warnings, migrate the *args and **kwargs passed to execute() methods that now must be a single list or dictionary. Alembic 1.5 is again waiting on this internal consistency to be present so that it can pass all tests with no 2.0 deprecation warnings. Change-Id: If6b792e57c8c5dff205419644ab68e631575a2fa
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 735990a20..7a898cb8a 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -3335,7 +3335,11 @@ class PGDialect(default.DefaultDialect):
"WHERE n.nspname = :schema AND c.relkind IN (%s)"
% (", ".join("'%s'" % elem for elem in kinds))
).columns(relname=sqltypes.Unicode),
- schema=schema if schema is not None else self.default_schema_name,
+ dict(
+ schema=schema
+ if schema is not None
+ else self.default_schema_name
+ ),
)
return [name for name, in result]
@@ -3367,8 +3371,12 @@ class PGDialect(default.DefaultDialect):
"WHERE n.nspname = :schema AND c.relname = :view_name "
"AND c.relkind IN ('v', 'm')"
).columns(view_def=sqltypes.Unicode),
- schema=schema if schema is not None else self.default_schema_name,
- view_name=view_name,
+ dict(
+ schema=schema
+ if schema is not None
+ else self.default_schema_name,
+ view_name=view_name,
+ ),
)
return view_def