From 3206fcd4dbde4b23829ad8d525933dd5f3ff50b1 2021-10-29 09:27:36 From: Erik Date: 2021-10-29 09:27:36 Subject: [PATCH] Import `reload` from `importlib` instead of `imp` The `imp` module was deprecated in Python 3.4 in favor of `importlib`, and the function `imp.reload` is now just a wrapper for `importlib.reload`. --- diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index bcf1a19..0e43ec6 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -121,9 +121,8 @@ import traceback import types import weakref import gc -from importlib import import_module +from importlib import import_module, reload from importlib.util import source_from_cache -from imp import reload # ------------------------------------------------------------------------------ # Autoreload functionality