]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
render 3rd party module annotations as forward references
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2021 20:43:45 +0000 (16:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2021 20:43:45 +0000 (16:43 -0400)
commitb08447862388ae4064c36dcc1f0c91d84fa3c06f
tree58c474bd8ef33aa4fb0541f394fc01d98f77b17e
parentd7ff21d06192e7b84246494ae1e6cc33cbd42af9
render 3rd party module annotations as forward references

Fixed issue where registration of custom ops was prone to failure due to
the registration process running ``exec()`` on generated code that as of
the 1.7 series includes pep-484 annotations, which in the case of end user
code would result in name resolution errors when the exec occurs. The logic
in question has been altered so that the annotations are rendered as
forward references so that the ``exec()`` can proceed.

Change-Id: I142b89e2f6354b2ce253f3b8109f59fa3aae68ef
Fixes: #920
alembic/operations/base.py
alembic/util/compat.py
docs/build/unreleased/920.rst [new file with mode: 0644]