-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
RecursionError on numpy 2.0.x when completing numpy.finfo
and reading type
#2020
Comments
It feels like this is definitely a bug, If you want to help, it would really be awesome to have a smaller reproducer for this. This is probably reproducible with a few lines of Python code. |
Trimmed down from `numpy.matrix`.
I got annoyed by my editor lagging out whenever I typed The important part appears to be that the inner stub imports |
Thank you for working on this - I managed to break it down so that I could add the bug to numpy 1.26, or remove it from 2.0.x, but was not able to reproduce it in a small, simple project. Your example has the highlights: either replace the Also, and I'm not sure if this is a bug, but omitting the |
That sounds really strange. But I guess if that reproduces it, I'm very happy you made it work @yut23. Does the traceback still look the same? With a lot of I'm not surprised that there is a RecursionError, but I'm surprised that that case comes from |
Steps to reproduce:
Install latest jedi (currently 0.19.1) and numpy (verified with 2.0.0 and 2.0.1)
Verify versions
Try to read the type of
numpy.finfo
:Workaround
If you have already imported the
numpy
module, this will not happen, as long as you don't hit cached results (i.e.import numpy
above before theInterpreter
is created). This suggests to me at least that this is an edge case in reading types from not-yet-imported modules, rather than a general issue.On the other hand, a call to
jedi.preload_module("numpy")
does not resolve this by itself resolve this.The text was updated successfully, but these errors were encountered: