Permalink
Browse files

Remove importlib dependency which not available in Python 2.6.

Since we are only doing an absolute import, it suffices to just run
`__import__(name)` and then find the module in `sys.modules`.

Closes #1874.
  • Loading branch information...
1 parent d7c7a8f commit 7067c17302d2f406d460d03575d7319d7a8b73b8 @bfroehle committed Jun 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/extensions/cythonmagic.py
@@ -17,7 +17,6 @@
import io
import os, sys
-from importlib import import_module
import imp
try:
@@ -101,7 +100,8 @@ def f(x):
module = self._reloads[module_name]
reload(module)
else:
- module = import_module(module_name)
+ __import__(module_name)
+ module = sys.modules[module_name]
self._reloads[module_name] = module
self._import_all(module)

0 comments on commit 7067c17

Please sign in to comment.