-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New crashes related to partial types #3986
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
Comments
Does the first crash occurs only in quick mode? It would be quite strange. |
Hm, you're right, the first crash also happened in plain --incremental mode. |
It looks like I have also a repro for the second crash that doesn't even require class C:
x = None
def __init__(self) -> None:
self.x = [] |
@gvanrossum |
Bingo! I have the repro for the first crash as well. It doesn't require from typing import Tuple, TypeVar
T = TypeVar('T')
def f(x: T) -> Tuple[T, T]:
...
x = None
(x, x) = f('') (I have found two similar scenarios with slightly different tracebacks but all related to partial types, I will add them to tests). |
OK, I updated PR #3995 so that it fixes both these crashes and two related crash scenarios. |
Thanks for finding repros and adding fixes! Did something change recently that caused these crashes to appear, or were we just lucky we didn't have these patterns in our codebase before? |
The one with |
Fixes #3986 and two additional similar crashes on partial types.
We recently upgraded to a newer mypy version (c000062) and are seeing new crashes. One has a traceback ending in
And the other:
I haven't investigated these nor tried to reduce them. I do have a repeatable demo of the latter.
The text was updated successfully, but these errors were encountered: