New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>: I tried running 2to3 on Twisted. Here's the result:
[EMAIL PROTECTED]:~/Projects/Twisted/trunk$ time ~/Projects/python/branches/release26-maint/python /home/exarkun/Projects/python/branches/release26-maint/Tools/scripts/2to3 twisted/ > 2to3.patch /home/exarkun/Projects/Divmod/trunk/Combinator/combinator/xsite.py:7: DeprecationWarning: the sets module is deprecated from sets import Set RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: ws_comma Traceback (most recent call last): File "/home/exarkun/Projects/python/branches/release26-maint/Tools/scripts/2to3", line 6, in <module> sys.exit(main("lib2to3.fixes")) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/main.py", line 92, in main rt.refactor(args, options.write, options.doctests_only) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 196, in refactor self.refactor_dir(dir_or_file, write, doctests_only) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 214, in refactor_dir self.refactor_file(fullname, write, doctests_only) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 237, in refactor_file tree = self.refactor_string(input, filename) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 262, in refactor_string self.refactor_tree(tree, name) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 301, in refactor_tree self.traverse_by(self.post_order, tree.post_order()) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/refactor.py", line 325, in traverse_by new = fixer.transform(node, results) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/fixes/fix_metaclass.py", line 148, in transform if not has_metaclass(node): File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/fixes/fix_metaclass.py", line 34, in has_metaclass return has_metaclass(node) File "/home/exarkun/Projects/python/branches/release26-maint/Lib/lib2to3/fixes/fix_metaclass.py", line 39, in has_metaclass if leaf_node.value == '__metaclass__': AttributeError: 'Node' object has no attribute 'value' real 0m32.451s user 0m31.498s sys 0m0.140s [EMAIL PROTECTED]:~/Projects/Twisted/trunk$ There's no indication of what it was processing, so I'm not sure what causes the error. ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 76893 nosy: exarkun severity: normal status: open title: metaclass fixer fails with AttributeError, causing 2to3 to exit with a traceback type: crash versions: Python 2.6 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4525> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com