From 7e3d032cc92af73988f02f281ab354de7fc8e3ab Mon Sep 17 00:00:00 2001 From: Luis Calderon Date: Tue, 16 Oct 2018 09:38:54 -0400 Subject: [PATCH] Replace set union_update() references with update() The autogenerate api references the `union_update()` method of sets which was removed in Python 2.4. The previous method is actually an alias for the `update()` method. This PR replaces the api reference with the correct one for Python 2.7 Change-Id: Ida8d44bfd2efc9d3c6879ca8237d6b39e2b76987 Pull-request: https://github.com/zzzeek/alembic/pull/46 --- alembic/autogenerate/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alembic/autogenerate/api.py b/alembic/autogenerate/api.py index b54e6aa2..15b5b6b0 100644 --- a/alembic/autogenerate/api.py +++ b/alembic/autogenerate/api.py @@ -395,7 +395,7 @@ class RevisionContext(object): # renders autogen_context.imports = set() if migration_script.imports: - autogen_context.imports.union_update(migration_script.imports) + autogen_context.imports.update(migration_script.imports) render._render_python_into_templatevars( autogen_context, migration_script, template_args ) -- 2.47.2