[issue40360] Deprecate lib2to3 (and 2to3) for future removal

Łukasz Langa report at bugs.python.org
Thu Sep 2 12:25:23 EDT 2021


Łukasz Langa <lukasz at langa.pl> added the comment:

The "pending" deprecation status of lib2to3 in 3.9 and 3.10 is no worse than a vanilla deprecation in terms of visibility. It will appear just the same when run with pytest or `-X dev`.

However, upgrading the deprecation between 3.10.0rc1 and 3.10.0rc2 really was too late. So we'll have it deprecated fully in 3.11 and removed in 3.13. One more year doesn't hurt us much but might be helpful for library maintainers to have more time to move off of the included lib2to3.

Invoking `2to3` also generates the warning so I guess this can be closed:

$ ./python.exe Tools/scripts/2to3
/private/tmp/cpy2/Tools/scripts/2to3:3: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  from lib2to3.main import main
At least one file or directory argument required.
Use --help to show usage.

Thanks for the patches, Gregory, Carl, and Victor! ✨ 🍰 ✨  

Now we just have to remember to actually remove the damn thing in 3.13 😂

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40360>
_______________________________________


More information about the Python-bugs-list mailing list