Show More
@@ -13,7 +13,11 b' from IPython.utils.path import ensure_dir_exists' | |||
|
13 | 13 | from traitlets import Instance |
|
14 | 14 | from IPython.utils.py3compat import PY3 |
|
15 | 15 | if PY3: |
|
16 | from imp import reload | |
|
16 | try: | |
|
17 | from importlib import reload | |
|
18 | except ImportError : | |
|
19 | ## deprecated since 3.4 | |
|
20 | from imp import reload | |
|
17 | 21 | |
|
18 | 22 | #----------------------------------------------------------------------------- |
|
19 | 23 | # Main class |
@@ -228,7 +228,11 b' def _list_readline(x):' | |||
|
228 | 228 | # Code for going between .py files and cached .pyc files ---------------------- |
|
229 | 229 | |
|
230 | 230 | try: # Python 3.2, see PEP 3147 |
|
231 | from imp import source_from_cache, cache_from_source | |
|
231 | try: | |
|
232 | from importlib.util import source_from_cache, cache_from_source | |
|
233 | except ImportError : | |
|
234 | ## deprecated since 3.4 | |
|
235 | from imp import source_from_cache, cache_from_source | |
|
232 | 236 | except ImportError: |
|
233 | 237 | # Python <= 3.1: .pyc files go next to .py |
|
234 | 238 | def source_from_cache(path): |
General Comments 0
You need to be logged in to leave comments.
Login now