-
Notifications
You must be signed in to change notification settings - Fork 13
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
🐛 Fix nested lazy import and sys meta path modification issue #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gkumbhat! There are two cleanup steps to get the tests to pass:
make fmt
git fetch origin && git rebase --signoff origin/main
092b2f9
to
50e173f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more little cleanup
import_tracker/lazy_import_errors.py
Outdated
sys.meta_path.pop() | ||
if self.finder in sys.meta_path: | ||
sys.meta_path.remove(self.finder) | ||
# while sys.meta_path and isinstance(sys.meta_path[-1], _LazyErrorMetaFinder): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these dead lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Nice improvement!
Signed-off-by: Gaurav-Kumbhat <[email protected]>
Signed-off-by: Gaurav-Kumbhat <[email protected]>
Signed-off-by: Gaurav-Kumbhat <[email protected]>
1a38981
to
193f288
Compare
Changes
sys.meta_path
is modified (appended) by some other library. This issue was noticed whensys.meta_path
was getting modified bysetuptools.command.build_py
.