Skip to content

Commit

Permalink
Merge "remove unnecessary execution_options.merge_with in _execute_dd…
Browse files Browse the repository at this point in the history
…l" into main
  • Loading branch information
zzzeek authored and Gerrit Code Review committed Jan 11, 2024
2 parents eff3aa8 + 396b1e6 commit f11d3f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/sqlalchemy/engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ def _execute_ddl(
) -> CursorResult[Any]:
"""Execute a schema.DDL object."""

execution_options = ddl._execution_options.merge_with(
exec_opts = ddl._execution_options.merge_with(
self._execution_options, execution_options
)

Expand All @@ -1512,12 +1512,11 @@ def _execute_ddl(
event_multiparams,
event_params,
) = self._invoke_before_exec_event(
ddl, distilled_parameters, execution_options
ddl, distilled_parameters, exec_opts
)
else:
event_multiparams = event_params = None

exec_opts = self._execution_options.merge_with(execution_options)
schema_translate_map = exec_opts.get("schema_translate_map", None)

dialect = self.dialect
Expand All @@ -1530,7 +1529,7 @@ def _execute_ddl(
dialect.execution_ctx_cls._init_ddl,
compiled,
None,
execution_options,
exec_opts,
compiled,
)
if self._has_events or self.engine._has_events:
Expand All @@ -1539,7 +1538,7 @@ def _execute_ddl(
ddl,
event_multiparams,
event_params,
execution_options,
exec_opts,
ret,
)
return ret
Expand Down

0 comments on commit f11d3f6

Please sign in to comment.