From d7727bdccdcd08db072892cd7fb07dcf4ad82446 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 9 Dec 2012 16:49:26 +0100 Subject: [PATCH] fix python3.2 problems --- jedi/imports.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jedi/imports.py b/jedi/imports.py index 8f95350b..f0661365 100644 --- a/jedi/imports.py +++ b/jedi/imports.py @@ -298,7 +298,9 @@ def invalidate_star_import_cache(module, only_main=False): pass if not only_main: - for key, (t, mods) in star_import_cache.items(): + # We need a list here because otherwise the list is being changed + # during the iteration in py3k: iteritems -> items. + for key, (t, mods) in list(star_import_cache.items()): if module in mods: invalidate_star_import_cache(key)