aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2019-07-14 11:24:24 +0200
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2019-10-21 20:36:46 +0200
commitd55827d5380625db1791d349ec84005f32568cda (patch)
treeb98b8622e149f5c73dccad6337d770e16ceb4ca5
parent75f9f6333075bd7f4cd63def83989a8a6a3a31d9 (diff)
Fix RuntimeError: dictionary changed size during iteration
Seems the dictionary of modules needs to be copied before iterating Fixes https://github.com/spyder-ide/qtpy/issues/195 Change-Id: I8517e031c4a250856d3318b364b1cd5dab3f8f80 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit dc73e75c1802df9e7594097ca65327b937097b3f) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index b8097719a..36b137104 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -225,7 +225,7 @@ class Reloader(object):
self.sys_module_count = len(sys.modules)
g = globals()
# PYSIDE-1009: Try to recognize unknown modules in errorhandler.py
- candidates = list(mod_name for mod_name in sys.modules
+ candidates = list(mod_name for mod_name in sys.modules.copy()
if self.module_valid(sys.modules[mod_name]))
for mod_name in candidates:
# 'top' is PySide2 when we do 'import PySide.QtCore'