From ebbbac0a76b3327a829864afb26ee1b7ff1dc780 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 6 Jan 2021 10:43:19 -0500 Subject: 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 --- lib/sqlalchemy/dialects/postgresql/base.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') 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 -- cgit v1.2.1