Closed dschult closed 4 months ago
@dschult I don't know; is this behavior a problem?
Python does all sorts of introspection into objects, so it's not surprising that, somewhere along the line, it triggers importing. I will close for now, unless you think we should fix this in lazy_loader
itself.
While trying to find a way to make
lazy_loader.load
work for subpackages (see #55), I discovered that IPython triggers a load of a lazily loaded package upon any exception being raised. A regular Python session does not.Example:
The same code run in a python session does not trigger the loading of the lazy module.
I checked that nothing is calling the module's
__getattr__
during that process. But something in IPython seems to be triggering the loading of lazily loaded modules.Is this another reason to remove
load
from the package?