-
-
Notifications
You must be signed in to change notification settings - Fork 3k
mypy --install-types
segfaults
#10596
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
This seem to be a problem with the binary wheels. As a workaround, you can uninstall mypy and reinstall without the binaries:
EDIT: See comment below for a better way to do it (replace However, this results in much worse performance. We'll need a 0.901 hotfix release. |
Note that most people probably want
|
This could result in a crash if the second evaluation results in a shorter list, such as in this example (besides being incorrect overall): ``` a = [s for s in f.readlines()] ``` `f.readlines()` was called twice, resulting in an empty list on the second call. This caused the list object constructed in the comprehension to have a NULL item, which is invalid. This fixes `mypy --install-types` in compiled mode. Fixes #10596.
I just released mypy 0.901 that includes a fix to this issue. |
@JukkaL, I can confirm this solves my problem. Thank you so much for the quick fix! |
Bug Report
When running
mypy --install-types
, mypy segfaults instead of completing successfully.To Reproduce
test.py
:mypy test.py
, which will display the following output:mypy --install-types
Actual Behavior
mypy outputs the following:
When running
python -X dev -m mypy --install-types
, I get the following, more verbose output:Your Environment
0.900
mypy.ini
(and other config files): None3.7.10
The text was updated successfully, but these errors were encountered: