Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix daemon crashes related to ParamSpec and TypeVarTuple #13381

Merged
merged 3 commits into from
Aug 23, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Aug 11, 2022

Fix daemon crash when using fine-grained caching and ParamSpec, with
traceback like this (when using a compiled mypy):

Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 230, in serve
  File "mypy/dmypy_server.py", line 273, in run_command
  File "mypy/dmypy_server.py", line 372, in cmd_recheck
  File "mypy/dmypy_server.py", line 529, in fine_grained_increment
  File "mypy/server/update.py", line 245, in update
  File "mypy/server/update.py", line 328, in update_one
  File "mypy/server/update.py", line 387, in update_module
  File "mypy/server/astdiff.py", line 158, in snapshot_symbol_table
  File "mypy/server/astdiff.py", line 236, in snapshot_type
  File "mypy/types.py", line 1173, in accept
  File "mypy/server/astdiff.py", line 300, in visit_instance
  File "mypy/nodes.py", line 2764, in fullname
AttributeError: attribute 'TypeInfo' of '_fullname' undefined

Also fix TypeVarTuple crashes when using daemon.

Fix daemon crash when using fine-grained caching and ParamSpec, with
traceback like this (when using a compiled mypy):

```
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 230, in serve
  File "mypy/dmypy_server.py", line 273, in run_command
  File "mypy/dmypy_server.py", line 372, in cmd_recheck
  File "mypy/dmypy_server.py", line 529, in fine_grained_increment
  File "mypy/server/update.py", line 245, in update
  File "mypy/server/update.py", line 328, in update_one
  File "mypy/server/update.py", line 387, in update_module
  File "mypy/server/astdiff.py", line 158, in snapshot_symbol_table
  File "mypy/server/astdiff.py", line 236, in snapshot_type
  File "mypy/types.py", line 1173, in accept
  File "mypy/server/astdiff.py", line 300, in visit_instance
  File "mypy/nodes.py", line 2764, in fullname
AttributeError: attribute 'TypeInfo' of '_fullname' undefined
```

Also fix TypeVarTuple crashes when using daemon.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@ilevkivskyi ilevkivskyi merged commit be6adae into master Aug 23, 2022
@ilevkivskyi ilevkivskyi deleted the fix-paramspec-fixup branch August 23, 2022 02:03
jhance pushed a commit that referenced this pull request Sep 9, 2022
* Fix daemon crashes related to ParamSpec and TypeVarTuple

Fix daemon crash when using fine-grained caching and ParamSpec, with
traceback like this (when using a compiled mypy):

```
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 230, in serve
  File "mypy/dmypy_server.py", line 273, in run_command
  File "mypy/dmypy_server.py", line 372, in cmd_recheck
  File "mypy/dmypy_server.py", line 529, in fine_grained_increment
  File "mypy/server/update.py", line 245, in update
  File "mypy/server/update.py", line 328, in update_one
  File "mypy/server/update.py", line 387, in update_module
  File "mypy/server/astdiff.py", line 158, in snapshot_symbol_table
  File "mypy/server/astdiff.py", line 236, in snapshot_type
  File "mypy/types.py", line 1173, in accept
  File "mypy/server/astdiff.py", line 300, in visit_instance
  File "mypy/nodes.py", line 2764, in fullname
AttributeError: attribute 'TypeInfo' of '_fullname' undefined
```

Also fix TypeVarTuple crashes when using daemon.

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants