Skip to content

Commit a48c093

Browse files
committed
SA14: Fix SQLAlchemy deprecation warning on before_execute event hdlr
SADeprecationWarning: The argument signature for the `ConnectionEvents.before_execute` event listener has changed as of version 1.4, and conversion for the old argument signature will be removed in a future release. The new signature is `def before_execute(conn, clauseelement, multiparams, params, execution_options)`.
1 parent ca33c73 commit a48c093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crate/client/sqlalchemy/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def rewrite_update(clauseelement, multiparams, params):
7070

7171

7272
@sa.event.listens_for(sa.engine.Engine, "before_execute", retval=True)
73-
def crate_before_execute(conn, clauseelement, multiparams, params):
73+
def crate_before_execute(conn, clauseelement, multiparams, params, *args, **kwargs):
7474
is_crate = type(conn.dialect).__name__ == 'CrateDialect'
7575
if is_crate and isinstance(clauseelement, sa.sql.expression.Update):
7676
if SA_VERSION >= SA_1_4:

0 commit comments

Comments
 (0)