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 mhammond
Recipients loewis, mhammond
Date 2008-10-08.00:49:56
SpamBayes Score 1.329297e-05
Marked as misclassified No
Message-id <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za>
In-reply-to
Content
The way build_py uses lib2to3 is out of date.  Instead of a dummy
Options object a dict should be used, and it seems the 'fixers' must
explicitly be loaded.  I'm afraid I don't have a specific patch as I
don't have a good test case, but the lib2to3 code needs to look
something like:

from lib2to3.refactor import RefactoringTool, get_fixers_from_package
fixers = get_fixers_from_package('lib2to3.fixes')
options = dict(doctests_only=False, fix=[], list_fixes=[], 
               print_function=False, verbose=False,
               write=True)
r = RefactoringTool(fixers, options)
r.refactor(self.updated_files)
History
Date User Action Args
2008-10-08 00:49:57mhammondsetrecipients: + mhammond, loewis
2008-10-08 00:49:57mhammondsetmessageid: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za>
2008-10-08 00:49:57mhammondlinkissue4072 messages
2008-10-08 00:49:56mhammondcreate