You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing a module setup with apipkg, successive imports, even if in different files, trigger a full load. I thought it would only load when actually used. I have some anecdotal observation that the behavior is intermittent, but when I put together this test code, it reproduces every time
i believe this relates to import looking up the attributes as requested, based on the structure of the import request i'd consider it the bug that it was not loaded the first time
the request in import was for mypkg.lazy.module - at that point it needs to resolve
i suspect theres a shortcut in python, but the actual bug is not loading it the first time
never ever request by name something thats nested in a lazy module if you dont want it included
I see. Perhaps I misunderstood the operation then. This means that only the top-level lazy module specification is meant to lie dormant (i.e. lazy) and any access below the top level is meant to trigger a full load
Problem
When importing a module setup with apipkg, successive imports, even if in different files, trigger a full load. I thought it would only load when actually used. I have some anecdotal observation that the behavior is intermittent, but when I put together this test code, it reproduces every time
How to Reproduce
system info:
Consider the following filetree
with contents:
then in a terminal:
The text was updated successfully, but these errors were encountered: