-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
dmypy crashes every 2nd run when trying to update unlreated and unchanged numpy.compat #11009
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
No idea if this is intended or not, but when I compare the dmypy and the mypy output I notice something else: dmypy checks way more files, while mypy only cares about the passed package. When I do not pass First run
Second run
Pure mypy
|
I am trying to come up with a minimal reproduction, but it is not really obvious for me, why the numpy error is raised here. What I know is that I have a dependency chain flask_rest_json_api->OtherPackage->numpy (not nice, but...). When trying to reproduce I noticed something else which might be related: dmypy has sometimes problems to only check for errors in the specified package. Repro:
|
Does this reproduce on master? It sounds like the kind of issue that #10937 recently fixed. |
@JelleZijlstra Yeps, could reproduce with master. Only dmymy has the problem, could not crash things with mypy only. |
I'm getting the same issues the second time I run |
I no longer see this issue on Although if a change in |
Crash Report
When dmypy is run the second time it crashes when trying to update its internal state. No code has been changed between runs.
Traceback
To Reproduce
I do not yet have a stand alone repo, but collected some logs what happens.
The problematic call is simply
dmypy run -- --config-file mypy.ini -p flask_rest_json_api
In the config we set
pretty=True
which causes the error to show up.When the crash happens, dmypy tries to update the error messages for the system wide installed
numpy
. The detected error is absolutely bogus. Thefile python3.9/site-packages/numpy/core/overrides.py
has only 227 lines while multiple errors are detected between lines 2936 and 3363 (see log below). Hence the crash.The thing is: We are not at all interested in these numpy errors. Numpy should not be a package errors are reported for. And the first run actually does not report any numpy errors.
The verbose logs from the second run. As we see
numpy.compat
is considered to be deleted. Theintegrity_problem
log has beed added by myself.Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: