[Python-Dev] 2to3 and timestamps
"Martin v. Löwis"
martin at v.loewis.de
Mon Dec 12 00:00:43 CET 2011
>> When running 2to3 from a setup.py script, does it run on the whole
>> codebase or only files that are found newer by the make-like
>> timestamp-based dependency system? If it’s the former, as some messages
>> seem to show (sorry no time to test right now), ISTM we can fix
>> distutils to do the latter (unless there are bugs due to import
>> rewriting to use explicit relative imports when there are extension
> It would be better to teach 2to3 to do it by itself. Not everybody runs
> 2to3 through a setup.py script.
For the 2to3 command line tool, the issue is where it shall place the
output. It currently supports writing diffs to stdout (without saving
any conversion result), and overwriting the original file (which means
that it loses the original files).
So before you try to consider incremental output, you need to consider
original-preserving saves first.
More information about the Python-Dev