You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order of imports in write_pyi requires alembic installed globally for some of the imports
Running write_pyi also requires sqlalchemy, black, and zimports installed globally
Expected behavior
As a development script, this should be runnable from within the codebase without hard dependencies on the external system.
To Reproduce
Uninstall global alembic and sqlalchemy packages and run python tools/write_pyi.py
Error
without global alembic
$ python tools/write_pyi.py
Traceback (most recent call last):
File "/Users/x/code/alembic/tools/write_pyi.py", line 15, in<module>
from alembic.autogenerate.api import AutogenContext
ModuleNotFoundError: No module named 'alembic'
with alembic installed globally you get
$ python tools/write_pyi.py
Traceback (most recent call last):
File "/Users/x/code/alembic/tools/write_pyi.py", line 16, in<module>
from alembic.autogenerate.api import AutogenContext
File "/Users/x/code/alembic/alembic/__init__.py", line 1, in<module>
from . import context
File "/Users/x/code/alembic/alembic/context.py", line 1, in<module>
from .runtime.environment import EnvironmentContext
File "/Users/x/code/alembic/alembic/runtime/environment.py", line 23, in<module>
from .migration import _ProxyTransaction
File "/Users/x/code/alembic/alembic/runtime/migration.py", line 35, in<module>
from .. import ddl
File "/Users/x/code/alembic/alembic/ddl/__init__.py", line 1, in<module>
from . import mssql
File "/Users/x/code/alembic/alembic/ddl/mssql.py", line 20, in<module>
from .base import AddColumn
File "/Users/x/code/alembic/alembic/ddl/base.py", line 19, in<module>
from ..util.sqla_compat import _columns_for_constraint # noqa
File "/Users/x/code/alembic/alembic/util/__init__.py", line 24, in<module>
from .pyfiles import coerce_resource_to_filename as coerce_resource_to_filename
File "/Users/x/code/alembic/alembic/util/pyfiles.py", line 15, in<module>
from mako import exceptions
ModuleNotFoundError: No module named 'mako'
Additional context
Fix incoming
Have a nice day!
The text was updated successfully, but these errors were encountered:
Describe the bug
There are two primary issues
Expected behavior
As a development script, this should be runnable from within the codebase without hard dependencies on the external system.
To Reproduce
Uninstall global alembic and sqlalchemy packages and run
python tools/write_pyi.py
Error
without global alembic
with alembic installed globally you get
Additional context
Fix incoming
Have a nice day!
The text was updated successfully, but these errors were encountered: