Title: New "Must not defer during final iteration" crash · Issue #14565 · python/mypy · GitHub
Open Graph Title: New "Must not defer during final iteration" crash · Issue #14565 · python/mypy
X Title: New "Must not defer during final iteration" crash · Issue #14565 · python/mypy
Description: Crash Report It looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in #14238 (comment) mypy 0.991 does not crash on ...
Open Graph Description: Crash Report It looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in #14238...
X Description: Crash Report It looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in #14238...
Opengraph URL: https://github.com/python/mypy/issues/14565
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New \"Must not defer during final iteration\" crash","articleBody":"**Crash Report**\r\n\r\nIt looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in https://github.com/python/mypy/pull/14238#issuecomment-1409828838\r\n\r\nmypy 0.991 does not crash on the project. I've bisected the crash to #14159 cc @ilevkivskyi \r\n\r\nThe crash is caused by the latest commit to the project: https://github.com/FasterSpeeding/Tanjun/commit/942b8b47106dddee9129ec4a6be312fe3e5eeac9\r\n\r\n**Traceback**\r\n\r\n```\r\n...\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/build.py\", line 3403, in process_stale_scc\r\n\t mypy.semanal_main.semantic_analysis_for_scc(graph, scc, manager.errors)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal_main.py\", line 85, in semantic_analysis_for_scc\r\n\t process_functions(graph, scc, patches)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal_main.py\", line 243, in process_functions\r\n\t process_top_level_function(\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal_main.py\", line 282, in process_top_level_function\r\n\t deferred, incomplete, progress = semantic_analyze_target(\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal_main.py\", line 339, in semantic_analyze_target\r\n\t analyzer.refresh_partial(\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal.py\", line 602, in refresh_partial\r\n\t self.accept(node)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal.py\", line 6175, in accept\r\n\t node.accept(self)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/nodes.py\", line 790, in accept\r\n\t return visitor.visit_func_def(self)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal.py\", line 829, in visit_func_def\r\n\t self.analyze_func_def(defn)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal.py\", line 864, in analyze_func_def\r\n\t self.defer(defn)\r\n\t File \"/private/tmp/mypy_primer/bisect_mypy/mypy/mypy/semanal.py\", line 5852, in defer\r\n\t assert not self.final_iteration, \"Must not defer during final iteration\"\r\n\tAssertionError: Must not defer during final iteration\r\n```\r\n\r\n**To Reproduce**\r\n\r\n```\r\ngit clone https://github.com/FasterSpeeding/Tanjun\r\ncd Tanjun\r\npython -m venv env\r\nenv/bin/python -m pip install hikari alluka\r\n\r\nmypy tanjun --show-traceback --python-executable=env/bin/python\r\n```","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2023-01-31T07:20:17Z","url":"https://github.com/python/mypy/issues/14565"}
| 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:e62771ba-0dd9-b6af-bae7-4f16a6e5245f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A00C:1DA187:2F359DD:3E541B8:6B0023FF |
| html-safe-nonce | 0198d95266d9915cd1505c87894fea96ba4d2e638f6738737a0558af222eb7e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDBDOjFEQTE4NzoyRjM1OUREOjNFNTQxQjg6NkIwMDIzRkYiLCJ2aXNpdG9yX2lkIjoiNjUwMTExNzc4NTI4NjkxMDk3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3f803a3ebc5e80159d34933f62cead7e2eefa673a31c4c5bd9186db1b3aaef98 |
| hovercard-subject-tag | issue:1563791928 |
| 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/14565/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5252ebdcc6e13fc6604add8f3c9a8b1b9b1e522c7c6dce90dbc55bcaeca270ca/python/mypy/issues/14565 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5252ebdcc6e13fc6604add8f3c9a8b1b9b1e522c7c6dce90dbc55bcaeca270ca/python/mypy/issues/14565 |
| og:image:alt | Crash Report It looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in #14238... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width