Show More
@@ -186,9 +186,9 b' class ModuleReloader(object):' | |||
|
186 | 186 | return |
|
187 | 187 | |
|
188 | 188 | if check_all or self.check_all: |
|
189 | modules = sys.modules.keys() | |
|
189 | modules = list(sys.modules.keys()) | |
|
190 | 190 | else: |
|
191 | modules = self.modules.keys() | |
|
191 | modules = list(self.modules.keys()) | |
|
192 | 192 | |
|
193 | 193 | for modname in modules: |
|
194 | 194 | m = sys.modules.get(modname, None) |
@@ -258,7 +258,7 b' def update_function(old, new):' | |||
|
258 | 258 | def update_class(old, new): |
|
259 | 259 | """Replace stuff in the __dict__ of a class, and upgrade |
|
260 | 260 | method code objects""" |
|
261 | for key in old.__dict__.keys(): | |
|
261 | for key in list(old.__dict__.keys()): | |
|
262 | 262 | old_obj = getattr(old, key) |
|
263 | 263 | |
|
264 | 264 | try: |
@@ -339,7 +339,7 b' def superreload(module, reload=reload, old_objects={}):' | |||
|
339 | 339 | """ |
|
340 | 340 | |
|
341 | 341 | # collect old objects in the module |
|
342 | for name, obj in module.__dict__.items(): | |
|
342 | for name, obj in list(module.__dict__.items()): | |
|
343 | 343 | if not hasattr(obj, '__module__') or obj.__module__ != module.__name__: |
|
344 | 344 | continue |
|
345 | 345 | key = (module.__name__, name) |
@@ -370,7 +370,7 b' def superreload(module, reload=reload, old_objects={}):' | |||
|
370 | 370 | raise |
|
371 | 371 | |
|
372 | 372 | # iterate over all objects and update functions & classes |
|
373 | for name, new_obj in module.__dict__.items(): | |
|
373 | for name, new_obj in list(module.__dict__.items()): | |
|
374 | 374 | key = (module.__name__, name) |
|
375 | 375 | if key not in old_objects: continue |
|
376 | 376 | |
@@ -473,9 +473,8 b' class AutoreloadMagics(Magics):' | |||
|
473 | 473 | """ |
|
474 | 474 | modname = parameter_s |
|
475 | 475 | if not modname: |
|
476 | to_reload = self._reloader.modules.keys() | |
|
477 | to_reload.sort() | |
|
478 | to_skip = self._reloader.skip_modules.keys() | |
|
476 | to_reload = sorted(self._reloader.modules.keys()) | |
|
477 | to_skip = sorted(self._reloader.skip_modules.keys()) | |
|
479 | 478 | to_skip.sort() |
|
480 | 479 | if stream is None: |
|
481 | 480 | stream = sys.stdout |
General Comments 0
You need to be logged in to leave comments.
Login now