-
Notifications
You must be signed in to change notification settings - Fork 664
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
args: ImportError('attempted relative import with no known parent package') #2805
Comments
The problem is that the low-level machinery is used and it does not specify |
Fixes: #2805 Related: ansible/ansible#79574
Fixes: #2805 Related: ansible/ansible#79574
I discovered that our newly args module is something throwing some weird Import Errors, and this time I found the culprit is ansible-core, which for some very weird reasons was using a relative import in the cose, which is a known issue.
https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/rules/args.py#L88
Replacing the relative import with a full import sorted the issue. Clearly we need to sort this in core and introduce a measure for preventing use of relative imports in the future.
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/setup.py#L175
One pleasant surprise is that this is the only relative import from lib, there are others inside tests but on code that ships, that is the only one.
The text was updated successfully, but these errors were encountered: