Skip to content

New semantic analyzer: daemon crash when stripping member lvalue #6834

@JukkaL

Description

@JukkaL

We've crashes like this with the new semantic analyzer:

Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 223, in serve
  File "mypy/dmypy_server.py", line 262, in run_command
  File "mypy/dmypy_server.py", line 326, in cmd_check
  File "mypy/dmypy_server.py", line 362, in check
  File "mypy/dmypy_server.py", line 421, in initialize_fine_grained
  File "mypy/server/update.py", line 241, in update
  File "mypy/server/update.py", line 307, in update_one
  File "mypy/server/update.py", line 386, in update_module
  File "mypy/server/update.py", line 835, in propagate_changes_using_dependencies
  File "mypy/server/update.py", line 953, in reprocess_nodes
  File "mypy/server/aststripnew.py", line 35, in strip_target_new
  File "mypy/nodes.py", line 643, in accept
  File "mypy/server/aststripnew.py", line 109, in visit_func_def__StatementVisitor_glue
  File "mypy/server/aststripnew.py", line 122, in visit_func_def
  File "mypy/traverser.py", line 52, in visit_func_def
  File "mypy/traverser.py", line 49, in visit_func
  File "mypy/nodes.py", line 966, in accept
  File "mypy/server/aststripnew.py", line 57, in visit_block__StatementVisitor_glue
  File "mypy/server/aststripnew.py", line 60, in visit_block
  File "mypy/traverser.py", line 37, in visit_block
  File "mypy/nodes.py", line 1024, in accept
  File "mypy/server/aststripnew.py", line 145, in visit_assignment_stmt__StatementVisitor_glue
  File "mypy/server/aststripnew.py", line 152, in visit_assignment_stmt
  File "mypy/server/aststripnew.py", line 201, in process_lvalue_in_method
KeyError: '_user_context'

I'm working on a small test case that reproduces the issue.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions