This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bhy
Recipients bhy, collinwinter
Date 2008-09-11.16:11:06
SpamBayes Score 4.5232373e-11
Marked as misclassified No
Message-id <1221149527.76.0.741904769923.issue3836@psf.upfronthosting.co.za>
In-reply-to
Content
In the py3k SVN head(r66389) of lib2to3, the main.py used Python 2.x's
print syntax, and the refactor.py used Python 3.0's exception syntax. So
the 2to3 finally broken on both Python 2.5 and 3.0.

Well, it able to run with Python 2.6, but also have a lot of errors like
this:

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__'
History
Date User Action Args
2008-09-11 16:12:07bhysetrecipients: + bhy, collinwinter
2008-09-11 16:12:07bhysetmessageid: <1221149527.76.0.741904769923.issue3836@psf.upfronthosting.co.za>
2008-09-11 16:11:07bhylinkissue3836 messages
2008-09-11 16:11:06bhycreate