-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
wrap_module
has limitations with relative imports
#8
Comments
Thanks for reporting the issue. tl;dr: You cannot perform relative imports directly from the
|
I'm closing this issue for now, but we may still chat here. |
Describe the bug
importlib.import_module
requires thepackage
argument to be non-null in the case of a relative import (e.g.importlib.import_module("..abc")
is not allowed). This causes problems when trying to import through a directory in thewrap_module
method. Take the following directory tree as an example:This will cause a
TypeError
when trying to callwrap_module
to importmy_config
in configzen, because the top levelmodule
directory is not a python package, causing the passed value toimport_module
to beNone
.To reproduce
Error
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: