Blame python-2.7-fix-2to3-itertools-import-star.patch

cff1b4
Index: lib2to3/tests/test_fixers.py
cff1b4
===================================================================
cff1b4
--- lib2to3/tests/test_fixers.py	(revision 82529)
cff1b4
+++ lib2to3/tests/test_fixers.py	(revision 82530)
cff1b4
@@ -3670,7 +3670,11 @@
cff1b4
         a = "from itertools import bar, filterfalse, foo"
cff1b4
         self.check(b, a)
cff1b4
 
cff1b4
+    def test_import_star(self):
cff1b4
+        s = "from itertools import *"
cff1b4
+        self.unchanged(s)
cff1b4
 
cff1b4
+
cff1b4
     def test_unchanged(self):
cff1b4
         s = "from itertools import foo"
cff1b4
         self.unchanged(s)
cff1b4
Index: lib2to3/fixes/fix_itertools_imports.py
cff1b4
===================================================================
cff1b4
--- lib2to3/fixes/fix_itertools_imports.py	(revision 82529)
cff1b4
+++ lib2to3/fixes/fix_itertools_imports.py	(revision 82530)
cff1b4
@@ -20,6 +20,9 @@
cff1b4
             if child.type == token.NAME:
cff1b4
                 member = child.value
cff1b4
                 name_node = child
cff1b4
+            elif child.type == token.STAR:
cff1b4
+                # Just leave the import as is.
cff1b4
+                return
cff1b4
             else:
cff1b4
                 assert child.type == syms.import_as_name
cff1b4
                 name_node = child.children[0]