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

Support using importlib on py>=3 to avoid imp deprecation #54883

Merged
merged 13 commits into from Apr 25, 2019

Conversation

@sivel
Copy link
Member

commented Apr 4, 2019

SUMMARY

Support using importlib on py>=3 to avoid imp deprecation

In Python 3.7+ importing imp results in a deprecation warning.

Implement functionality to utilize importlib in Py3+

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/executor/module_common.py

ADDITIONAL INFORMATION

When a module fails, this imp deprecation can be printed, and it has been confusing users, potentially obscuring the real problem from them.

@sivel sivel force-pushed the sivel:imp-deprecation branch to d10af82 Apr 4, 2019

@sivel sivel changed the title [WIP] Support using importlib on py>=3.5 to avoid imp deprecation [WIP] Support using importlib on py>=3 to avoid imp deprecation Apr 4, 2019

@bcoca bcoca removed the needs_triage label Apr 9, 2019

@sivel sivel requested review from nitzmahone, bcoca and s-hertel Apr 16, 2019

@sivel sivel requested a review from samdoran Apr 16, 2019

@sivel sivel changed the title [WIP] Support using importlib on py>=3 to avoid imp deprecation Support using importlib on py>=3 to avoid imp deprecation Apr 16, 2019

@ansibot ansibot added core_review and removed WIP labels Apr 16, 2019

Show resolved Hide resolved lib/ansible/executor/module_common.py Outdated

@ansibot ansibot added needs_revision and removed core_review labels Apr 22, 2019

@ansibot ansibot added core_review and removed needs_revision labels Apr 23, 2019

@sivel sivel merged commit 2732cde into ansible:devel Apr 25, 2019

1 check passed

Shippable Run 120361 status is SUCCESS.
Details
@@ -28,6 +27,12 @@
from ansible.utils.display import Display
from ansible.utils.plugin_docs import add_fragments

try:

This comment has been minimized.

Copy link
@webknjaz

webknjaz Apr 25, 2019

Member

I think all of this stuff should go into a separate compat module abstracting hacks away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.