-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Circular import issue involving getlimits and NPY_DT_DBG_TRACING #12063
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
getlimits previously called numpy code before all of numpy was loaded, which often causes circular import issues. This delays getlimits init. Fixes numpy#12063
The easy fix here is to not have |
Those SystemErrors can be fixed by checking return values in the code generating the message "Calculating dtype transfer ..." |
Nope. I'm starting to question my understanding of how relative imports work. |
I think that's only a temporary fix, it doesn't fix the deeper issue: I was able to fix this particular But it's not just It does seem slightly incorrect that so many core modules import the parent numpy module. But it seems like a lot of work to undo that. It also seems incorrect that |
I think part of the problem is that the internal structure of |
PR #10602 seems to have triggered a circular import problem when using the dtype-transer debug mode. (set
NPY_DT_DBG_TRACING
to 1 at the top ofdtype_transfer.c
).The problem seems to be that debug tracing tries to print a dtype before the dtype object has been created, I'm still trying to see what happened.
It involves
getlimits.py
which has been the source of circular import issues in the past.The text was updated successfully, but these errors were encountered: