-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
mypy --follow-imports error or skip crashes with numpy 2.0.0 #17396
Comments
I also got the same error running |
Thanks for the issue. I minimised the repro, in case someone has time to look into it:
|
(also standard disclaimer: a global |
Thank you for looking into this @hauntsaninja. Would you mind clarifying what |
@rgommers I don't think there's anything for numpy to do here, this just needs to be fixed in mypy. That said, there is one unrelated case of a missing import in numpy's type stubs that would be good to fix:
|
Thanks @hauntsaninja. I opened a PR to fix that issue, it should land in numpy 2.0.1. |
Running stubgen over Running attached test.txt Windows batch script results in;
|
If this helps at all, stubgen from mypy < 1.5.0 does not produce this error when generating stubs for modules that use numpy 2.0.0. |
Mypy is broken, cf python/mypy#17396
This is a mypy crash revealed by the release of numpy 2.0.0. See also numpy/numpy#26720
Crash Report
The crash is shown below. Notes:
Traceback
To Reproduce
pip install numpy mypy
echo "import numpy" > test.py
mypy test.py --follow-imports error
Your Environment
--follow-imports error
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: