]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Move use of ``__file__`` to be local to template access
authorlayday <layday@protonmail.com>
Mon, 3 Feb 2020 14:40:49 +0000 (09:40 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 3 Feb 2020 17:17:30 +0000 (12:17 -0500)
commitb3ce609f5d39fa485e39f78dfd3ed6c2b4d9d474
tree49b1fe927da374c8d8d210db1821669be3e20313
parentbd0770661dd9879780b2e6248083f80c11dce92a
Move use of ``__file__`` to be local to template access

Moved the use of the ``__file__`` attribute at the base of the Alembic
package into the one place that it is specifically needed, which is when
the config attempts to locate the template directory. This helps to allow
Alembic to be fully importable in environments that are using Python
memory-only import schemes.  Pull request courtesy layday.

Partially-fixes: #648
Closes: #651
Pull-request: https://github.com/sqlalchemy/alembic/pull/651
Pull-request-sha: c30299dbc3499c59e81602d91deb3b03166b4583

Change-Id: I2607031d80c418ce4d7e779eeb42c57a53a72ce0
alembic/__init__.py
alembic/config.py
docs/build/unreleased/648_file.rst [new file with mode: 0644]