Kaydet (Commit) 559cb826 authored tarafından Max Burstein's avatar Max Burstein

Fixed #21049 -- Fixed autoreload for Python 3

Changed th system module values check to return a list.
In Python 3 it returns a dict_view which could occassionally produce
a runtime error of "dictionary changed size during iteration".
üst c7c19ac4
...@@ -57,7 +57,7 @@ _error_files = [] ...@@ -57,7 +57,7 @@ _error_files = []
def code_changed(): def code_changed():
global _mtimes, _win global _mtimes, _win
filenames = [] filenames = []
for m in sys.modules.values(): for m in list(sys.modules.values()):
try: try:
filenames.append(m.__file__) filenames.append(m.__file__)
except AttributeError: except AttributeError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment