8000 FIX six issue with module imports · scikit-learn/scikit-learn@25f72c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25f72c4

Browse files
andaaglarsmans
authored andcommitted
FIX six issue with module imports
Fixes #3518, #3519. Inspired by Johannes Schönberger's patch to scikit-image, scikit-image/scikit-image@71743d2
1 parent ffd13c3 commit 25f72c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sklearn/utils/testing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,9 @@ def clean_warning_registry():
608608
"""Safe way to reset warnings """
609609
warnings.resetwarnings()
610610
reg = "__warningregistry__"
611-
for mod in sys.modules.copy().values():
611+
for mod_name, mod in list(sys.modules.items()):
612+
if 'six.moves' in mod_name:
613+
continue
612614
if hasattr(mod, reg):
613615
getattr(mod, reg).clear()
614616

0 commit comments

Comments
 (0)
0