-
Notifications
You must be signed in to change notification settings - Fork 22
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
Doubt about Absolute import vs relative import #128
Comments
I'm away atm but please ping me if you don't hear back by mid-August. |
I don't think this has anything to do with absolute vs relative imports. It looks like a problem with how EAGER_IMPORT was designed. When EAGER_IMPORT is truthy, it runs these lines inside the attach function: if os.environ.get("EAGER_IMPORT", ""):
for attr in set(attr_to_modules.keys()) | submodules:
__getattr__(attr) which means that when this is called The reason I've never run into this is that I don't think I typically write code where simply accessing an attribute will access another attribute in the module. But thinking about it, I'm not immediately sure what the pattern looks like that would cause that. Are you using any custom |
Thank you for the explanation @Erotemic. At some point I need to create a minimal example to understand in details what is going on.
No |
Hi all,
Our package is using absolute import (fury: https://github.com/fury-gl/fury).
We just added
lazy-loader
package and it seems to work like a charm.However, when we activate
EAGER_IMPORT
on our CI's or locally, we encounter many circular import and everything fails.Not sure why and it seems I miss understand something.
Can someone explain this behavior?
I check all the other projects using
lazy-loader
package and they all use relative import. So, I suppose, there is a reason I do not get or an issue with the package.Thank you for the feedback
The text was updated successfully, but these errors were encountered: