New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2to3 broken due to mixed 2.5 and 3.0 syntax #48086
Labels
Comments
In the py3k SVN head(r66389) of lib2to3, the main.py used Python 2.x's Well, it able to run with Python 2.6, but also have a lot of errors like Traceback (most recent call last):
File "/usr/bin/2to3", line 6, in <module>
sys.exit(main("lib2to3.fixes"))
File "/home/kid/python-site/lib2to3/main.py", line 71, in main
rt = refactor.RefactoringTool(fixer_names, rt_opts, explicit=explicit)
File "/home/kid/python-site/lib2to3/refactor.py", line 119, in __init__
self.pre_order, self.post_order = self.get_fixers()
File "/home/kid/python-site/lib2to3/refactor.py", line 138, in get_fixers
mod = __import__(fix_mod_path, {}, {}, ["*"])
File "/home/kid/python-site/lib2to3/fixes/fix_dict.py", line 38, in
<module>
class FixDict(fixer_base.BaseFix):
File "/home/kid/python-site/lib2to3/fixes/fix_dict.py", line 76, in
FixDict
p1 = patcomp.compile_pattern(P1)
File "/home/kid/python-site/lib2to3/patcomp.py", line 186, in
compile_pattern
return PatternCompiler().compile_pattern(pattern)
File "/home/kid/python-site/lib2to3/patcomp.py", line 57, in
compile_pattern
root = self.driver.parse_tokens(tokens, debug=debug)
File "/home/kid/python-site/lib2to3/pgen2/driver.py", line 45, in
parse_tokens
for quintuple in tokens:
File "/home/kid/python-site/lib2to3/patcomp.py", line 34, in
tokenize_wrapper
tokens = tokenize.generate_tokens(driver.generate_lines(input).__next__)
AttributeError: 'generator' object has no attribute '__next__' |
bhy
mannequin
added
topic-2to3
type-crash
A hard crash of the interpreter, possibly with a core dump
labels
Sep 11, 2008
A patch on main.py to fix this. |
main.py is really not a public interface, but it should be fixed. |
Fixed in r66392. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: