Closed
Description
Crash Report
Running mypy
in a simple file which uses type annotations from alembic
1.7.0
gives a crash. Works fine with `1.6.5 .
Traceback
Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "E:\projects\temp\.env39-alembic-mypy\Scripts\mypy.exe\__main__.py", line 7, in <module>
File "e:\projects\temp\.env39-alembic-mypy\lib\site-packages\mypy\__main__.py", line 11, in console_entry
main(None, sys.stdout, sys.stderr)
File "mypy\main.py", line 87, in main
File "mypy\main.py", line 165, in run_build
File "mypy\build.py", line 179, in build
File "mypy\build.py", line 254, in _build
File "mypy\build.py", line 2697, in dispatch
File "mypy\build.py", line 3021, in process_graph
File "mypy\build.py", line 3138, in process_stale_scc
File "mypy\build.py", line 2288, in write_cache
File "mypy\build.py", line 1475, in write_cache
File "mypy\nodes.py", line 313, in serialize
File "mypy\nodes.py", line 3149, in serialize
File "mypy\nodes.py", line 3083, in serialize
AssertionError: Definition of alembic.runtime.migration.EnvironmentContext is unexpectedly incomplete
To Reproduce
File:
from alembic.operations import Operations
def update(op: Operations) -> None:
...
Command-line:
λ mypy foo.py --no-implicit-reexport --show-traceback --ignore-missing-imports
Relevant information:
- Crash only happens with
alembic 1.7.0
, works fine with1.6.5
.
Your Environment
λ pip list
Package Version
----------------- --------
alembic 1.7.0
greenlet 1.1.1
Mako 1.1.5
MarkupSafe 2.0.1
mypy 0.910
mypy-extensions 0.4.3
pip 21.1.2
setuptools 57.4.0
SQLAlchemy 1.4.23
toml 0.10.2
typing-extensions 3.10.0.2
wheel 0.36.2
OS: Windows 10
Python: 3.9.6
I was wondering if I should report this in alembic
's repository, but given this generates an internal error I figured I should post here first.