Skip to content
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

Limitations of relative imports #75

Open
duckie opened this issue May 20, 2020 · 0 comments
Open

Limitations of relative imports #75

duckie opened this issue May 20, 2020 · 0 comments

Comments

@duckie
Copy link
Contributor

duckie commented May 20, 2020

Relative imports can have various impacts when the package is used from an external script, since said script may execute in the right virtual env but maybe not the right python context module wise.

There is two solutions to this:

  • Expose symbols between modules in the main init file
  • Use fully qualified imports

Unfortunately, the fully qualified break the possibility to "relocate" the module, ie, making it a submodule of another, which is required here for it to be usable as Ansible module utils.

No action is specifically required, this issue is merely a reminder of previous work in case the question arise later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant