Repository navigation
Fix crash in astdiff.py related to ec11a500f. - #5126
Conversation
I had been seeing the same crash that patch aimed to fix running against Quip's codebase, but have been unable to reduce it to a test case. With this patch, we're now able to use dmypy. Traceback from crash after ec11a50: File "/usr/local/lib/python3.6/site-packages/mypy/server/update.py", line 760, in propagate_changes_using_dependencies triggered |= reprocess_nodes(manager, graph, id, nodes, deps) File "/usr/local/lib/python3.6/site-packages/mypy/server/update.py", line 920, in reprocess_nodes new_symbols_snapshot = snapshot_symbol_table(file_node.fullname(), file_node.names) File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 159, in snapshot_symbol_table result[name] = snapshot_definition(node, common) File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 214, in snapshot_definition symbol_table = snapshot_symbol_table(prefix, node.names) File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 154, in snapshot_symbol_table assert symbol.kind != UNBOUND_IMPORTED
|
This looks totally plausible. I'll try to see if I can reverse-engineer a testcase. |
|
I'm going to merge this because I believe it to be likely to do more good than harm, though I haven't been able to track down a testcase. Part of the reason I'm willing to do this is that I think that it probably isn't actually necessary for That is a bigger change, though, and I'm more willing to cherry-pick this one, so I'm going to do that and follow-up on it later. |
I had been seeing the same crash that patch aimed to fix running against Quip's
codebase, but have been unable to reduce it to a test case. With this patch,
we're now able to use dmypy.
Traceback from crash after ec11a50:
File "/usr/local/lib/python3.6/site-packages/mypy/server/update.py", line 760, in propagate_changes_using_dependencies
triggered |= reprocess_nodes(manager, graph, id, nodes, deps)
File "/usr/local/lib/python3.6/site-packages/mypy/server/update.py", line 920, in reprocess_nodes
new_symbols_snapshot = snapshot_symbol_table(file_node.fullname(), file_node.names)
File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 159, in snapshot_symbol_table
result[name] = snapshot_definition(node, common)
File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 214, in snapshot_definition
symbol_table = snapshot_symbol_table(prefix, node.names)
File "/usr/local/lib/python3.6/site-packages/mypy/server/astdiff.py", line 154, in snapshot_symbol_table
assert symbol.kind != UNBOUND_IMPORTED