JETM JETM - 1 month ago 25
Python Question

2to3 says "No changes needed", then "files that need to be modified"

I run

2to3 -f all -f idioms -f buffer -f set_literal -f ws_comma foo.py


Output:

RefactoringTool: No changes to foo.py
RefactoringTool: Files that need to be modified:
RefactoringTool: foo.py


Contents of
foo.py
:

print("Hi")


How do I interpret this output?

Answer

According to Steven D'Aprano, this is a bug and the final line of text in your output should be interpreted as:

Files that include something that a fixer cares about, whether or not it gets modified.

In your case, the foo.py code is perfectly compatible with Python 3 and no changes are needed as the first line of your output states.