Change signature of "sqlalchemy.events.ConnectionEvents.before_execute"

New method signature is:
  def before_execute(conn, clauseelement, multiparams, params,
                     execution_options)

Closes-Bug: #1952409
Change-Id: I817c04ffe97ff03f60ff63d38471e48d7c63ceb7
This commit is contained in:
Rodolfo Alonso Hernandez 2021-11-26 10:25:58 +00:00 committed by Rodolfo Alonso
parent 90b5456b8c
commit d3990468b9
1 changed files with 4 additions and 2 deletions

View File

@ -286,11 +286,13 @@ class _TestModelsMigrations(test_migrations.ModelsMigrationsSync):
return is_excepted_alembic(clauseelement, exceptions)
return True
def check_expand_branch(conn, clauseelement, multiparams, params):
def check_expand_branch(conn, clauseelement, multiparams, params,
execution_options):
if not is_allowed(clauseelement, drop_exceptions, DROP_OPERATIONS):
self.fail("Migration in expand branch contains drop command")
def check_contract_branch(conn, clauseelement, multiparams, params):
def check_contract_branch(conn, clauseelement, multiparams, params,
execution_options):
if not is_allowed(clauseelement, creation_exceptions,
CREATION_OPERATIONS):
self.fail("Migration in contract branch contains create "