]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Replace set union_update() references with update()
authorLuis Calderon <luis.calderon@semanticbits.com>
Tue, 16 Oct 2018 13:38:54 +0000 (09:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 16 Oct 2018 13:38:54 +0000 (09:38 -0400)
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

index b54e6aa2f87a94f291c9536670cd7fc29dd5cedd..15b5b6b0bcb6e141abb858574c24a511be209f7c 100644 (file)
@@ -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
             )