-
Notifications
You must be signed in to change notification settings - Fork 291
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
Update imp to importlib for py3 #574
Update imp to importlib for py3 #574
Conversation
python36/37 are failing for some tests which may have to do with the |
if sys.version_info >= (3, 6): | ||
import importlib as imp | ||
else: | ||
import imp | ||
imp.reload(imp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is causing the CI failure.
According to docs, the module has been deprecated since 3.4 with certain methods deprecated since 3.3. Looking at specific methods such as https://docs.python.org/3/library/imp.html#imp.find_module, you might not be able to do a blanket alias and have to do specific imports. |
Thanks @jccurtis ! |
imp
was deprecated in py36. While this package is not needed in most py3 packages after Jan2020, there still are some which maintain py27 support and thisDeprecationWarning
pops up. I think I covered all cases in the src tree. There are 2 (AFAIK) locations elsewhere (examples and docs) that usefrom imp import reload
. I did not patch these.Closes #488