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
While developing a plugin I discovered that the plugin loader system is recursively calling imp.load_module() on every file it finds under the PLUGIN_PATH, not every directory / module. Because of this __init__.py is not always parsed prior to other code in the module.
I'm cutting an issue instead of a PR because I can't think of a situation where doing module imports rather than file imports would break something but I want to get some second opinions because maybe I'm just not very imaginative.
The text was updated successfully, but these errors were encountered:
The only negative is that if you import a module you must avoid name collisions. That's not usually a big deal, but can occasionally bite people. One benefit is that it would let plugins reference each other more easily. It's probably more because of my poor coding skills, but I occasionally end up in situations where I have two separate plugins, each with distinct configs, that would really like to reference each other. Sure, you can use @route() to provide a kind of back channel, but I'm not a fan of that.
While developing a plugin I discovered that the plugin loader system is recursively calling
imp.load_module()
on every file it finds under the PLUGIN_PATH, not every directory / module. Because of this__init__.py
is not always parsed prior to other code in the module.I'm cutting an issue instead of a PR because I can't think of a situation where doing module imports rather than file imports would break something but I want to get some second opinions because maybe I'm just not very imaginative.
The text was updated successfully, but these errors were encountered: