New submission from Dave Malcolm <dmalc...@redhat.com>: fix_itertools_imports.py fails on a "*" import
2to3 fails on this code: from itertools import * with a traceback: File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 3680, in test_star self.warns_unchanged(s, "Cannot handle star imports") File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged self.warns(before, before, message, unchanged=True) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 43, in warns tree = self._check(before, after) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 32, in _check tree = self.refactor.refactor_string(before, self.filename) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 359, in refactor_string self.refactor_tree(tree, name) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 393, in refactor_tree self.traverse_by(self.post_order_heads, tree.post_order()) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 417, in traverse_by new = fixer.transform(node, results) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/fixes/fix_itertools_imports.py", line 24, in transform assert child.type == syms.import_as_name AssertionError (seen when running 2to3 on python-lxml ; see problem in downstream tracker: https://bugzilla.redhat.com/show_bug.cgi?id=600036 ) ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 106991 nosy: dmalcolm priority: normal severity: normal status: open title: 2to3 fails with assertion failure on "from itertools import *" versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8892> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com