##// END OF EJS Templates
Merge pull request #2795 from kmike/autoreload-cleanup...
Thomas Kluyver -
r9133:0582f927 merge
parent child Browse files
Show More
@@ -107,7 +107,6 b' skip_doctest = True'
107 107 # Imports
108 108 #-----------------------------------------------------------------------------
109 109
110 import imp
111 110 import os
112 111 import sys
113 112 import traceback
@@ -127,16 +126,6 b' from IPython.utils.py3compat import PY3'
127 126 # Autoreload functionality
128 127 #------------------------------------------------------------------------------
129 128
130 def _get_compiled_ext():
131 """Official way to get the extension of compiled files (.pyc or .pyo)"""
132 for ext, mode, typ in imp.get_suffixes():
133 if typ == imp.PY_COMPILED:
134 return ext
135
136
137 PY_COMPILED_EXT = _get_compiled_ext()
138
139
140 129 class ModuleReloader(object):
141 130 enabled = False
142 131 """Whether this reloader is enabled"""
@@ -218,7 +207,6 b' class ModuleReloader(object):'
218 207 path, ext = os.path.splitext(filename)
219 208
220 209 if ext.lower() == '.py':
221 ext = PY_COMPILED_EXT
222 210 pyc_filename = pyfile.cache_from_source(filename)
223 211 py_filename = filename
224 212 else:
@@ -322,7 +310,7 b' else:'
322 310 (lambda a, b: isinstance2(a, b, types.MethodType),
323 311 lambda a, b: update_function(a.im_func, b.im_func)),
324 312 ])
325
313
326 314
327 315 def update_generic(a, b):
328 316 for type_check, update in UPDATE_RULES:
General Comments 0
You need to be logged in to leave comments. Login now