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

8000
Skip to content

Commit a128220

Browse 8000 files
andaagGaelVaroquaux
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 cb27e4c commit a128220

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
@@ -580,7 +580,9 @@ def clean_warning_registry():
580580
"""Safe way to reset warnings """
581581
warnings.resetwarnings()
582582
reg = "__warningregistry__"
583-
for mod in sys.modules.copy().values():
583+
for mod_name, mod in list(sys.modules.items()):
584+
if 'six.moves' in mod_name:
585+
continue
584586
if hasattr(mod, reg):
585587
getattr(mod, reg).clear()
586588

0 commit comments

Comments
 (0)
0