Title: Crash with alembic 1.7.0 · Issue #11038 · python/mypy · GitHub
Open Graph Title: Crash with alembic 1.7.0 · Issue #11038 · python/mypy
X Title: Crash with alembic 1.7.0 · Issue #11038 · python/mypy
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_m...
Open Graph 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\...
X 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...
Opengraph URL: https://github.com/python/mypy/issues/11038
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash with alembic 1.7.0","articleBody":"\r\n**Crash Report**\r\n\r\nRunning `mypy` in a simple file which uses type annotations from [`alembic`](https://github.com/sqlalchemy/alembic) `1.7.0` gives a crash. Works fine with `1.6.5 .\r\n\r\n**Traceback**\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Python39\\lib\\runpy.py\", line 197, in _run_module_as_main\r\n return _run_code(code, main_globals, None,\r\n File \"C:\\Python39\\lib\\runpy.py\", line 87, in _run_code\r\n exec(code, run_globals)\r\n File \"E:\\projects\\temp\\.env39-alembic-mypy\\Scripts\\mypy.exe\\__main__.py\", line 7, in \u003cmodule>\r\n File \"e:\\projects\\temp\\.env39-alembic-mypy\\lib\\site-packages\\mypy\\__main__.py\", line 11, in console_entry\r\n main(None, sys.stdout, sys.stderr)\r\n File \"mypy\\main.py\", line 87, in main\r\n File \"mypy\\main.py\", line 165, in run_build\r\n File \"mypy\\build.py\", line 179, in build\r\n File \"mypy\\build.py\", line 254, in _build\r\n File \"mypy\\build.py\", line 2697, in dispatch\r\n File \"mypy\\build.py\", line 3021, in process_graph\r\n File \"mypy\\build.py\", line 3138, in process_stale_scc\r\n File \"mypy\\build.py\", line 2288, in write_cache\r\n File \"mypy\\build.py\", line 1475, in write_cache\r\n File \"mypy\\nodes.py\", line 313, in serialize\r\n File \"mypy\\nodes.py\", line 3149, in serialize\r\n File \"mypy\\nodes.py\", line 3083, in serialize\r\nAssertionError: Definition of alembic.runtime.migration.EnvironmentContext is unexpectedly incomplete\r\n```\r\n\r\n**To Reproduce**\r\n\r\nFile:\r\n\r\n```python\r\nfrom alembic.operations import Operations\r\n\r\ndef update(op: Operations) -> None:\r\n ...\r\n```\r\n\r\nCommand-line:\r\n\r\n```\r\nλ mypy foo.py --no-implicit-reexport --show-traceback --ignore-missing-imports\r\n``` \r\n\r\nRelevant information:\r\n\r\n* Crash only happens with `alembic 1.7.0`, works fine with `1.6.5`.\r\n\r\n**Your Environment**\r\n\r\n```\r\nλ pip list\r\nPackage Version\r\n----------------- --------\r\nalembic 1.7.0\r\ngreenlet 1.1.1\r\nMako 1.1.5\r\nMarkupSafe 2.0.1\r\nmypy 0.910\r\nmypy-extensions 0.4.3\r\npip 21.1.2\r\nsetuptools 57.4.0\r\nSQLAlchemy 1.4.23\r\ntoml 0.10.2\r\ntyping-extensions 3.10.0.2\r\nwheel 0.36.2\r\n```\r\n\r\nOS: Windows 10\r\nPython: 3.9.6\r\n\r\n---\r\n\r\nI 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.","author":{"url":"https://github.com/nicoddemus","@type":"Person","name":"nicoddemus"},"datePublished":"2021-08-30T21:28:03Z","url":"https://github.com/python/mypy/issues/11038"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a217a028-5de5-de0c-a2c8-fbb291d485fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8298:120A77:226E203:2EE2DBB:6B002A9A |
| html-safe-nonce | c1d33edeb51902fa3b89de7a8e61d8503aefbe7c3bdd08ca14ca0e233889cbb4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mjk4OjEyMEE3NzoyMjZFMjAzOjJFRTJEQkI6NkIwMDJBOUEiLCJ2aXNpdG9yX2lkIjoiNDg2NDg5MTM5MjMxODYxNDAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d8148e8c456e8a3dab915290082249dd3e085abbbdf33a30db4e822580aec324 |
| hovercard-subject-tag | issue:983220904 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/11038/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82faf3ec9daf599668cd14bc9308c403a748bfb062310c4912ce52f81475db3a/python/mypy/issues/11038 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82faf3ec9daf599668cd14bc9308c403a748bfb062310c4912ce52f81475db3a/python/mypy/issues/11038 |
| og:image:alt | 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\... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nicoddemus |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width