Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: When importing a lazy value if we can trigger this lookup while already doing an import. One chain of events is: `globals().items()` -> forced import of all values -> (import of package, not defined, does `hasattr` to see if it's there -> triggers import) x 10. As we unwind through the chain of getattrs we continuously leak a reference to the value as the inner most one changed it. So we need to be more aggressive about what we do when checking if the dictionary changed. This causes us to retry the lookup if keys/kind/or the current key have changed. If only the value has changed we return the new value instead of the one we just imported. Reviewed By: Kronuz Differential Revision: D68735993 fbshipit-source-id: 03365011e0eccb2297bfb10886be9a013e331140
- Loading branch information