Can lib2to3 and 2to3 be deprecated yet?
Hi, I vaguely recall that PEP 617 "New PEG parser for CPython" was supposed to deprecate the lib2to3 module and the 2to3 program. I see that lib2to3/__init__.py contains a PendingDeprecationWarning in Python 3.9. Can it be converted into a regular DeprecationWarning and document the deprecation in Doc/library/2to3.rst? -- Do we still want to maintain lib2to3? People who didn't migrate to Python 3 can use 2to3 of Python 3.9 or Python 3.10. There are also other tools like 2to6, modernize, etc. (or my "sixer" project which I no longer maintains.) I'm not sure sure if the lib2to3 module is used by 3rd party projects like modernize or black? I understood that lib2to3 is a LL(1) parser and so cannot be used with latest Python grammar. Well, also, Python 2.7 is not longer supported. Victor -- Night gathers, and now my watch begins. It shall not end until my death.
On 12/10/20 10:58 AM, Victor Stinner wrote:
Hi,
I vaguely recall that PEP 617 "New PEG parser for CPython" was supposed to deprecate the lib2to3 module and the 2to3 program.
I see that lib2to3/__init__.py contains a PendingDeprecationWarning in Python 3.9. Can it be converted into a regular DeprecationWarning and document the deprecation in Doc/library/2to3.rst?
--
Do we still want to maintain lib2to3? People who didn't migrate to Python 3 can use 2to3 of Python 3.9 or Python 3.10. There are also other tools like 2to6, modernize, etc. (or my "sixer" project which I no longer maintains.)
I'm not sure sure if the lib2to3 module is used by 3rd party projects like modernize or black?
lib2to3 is used by distutils/util, so why deprecate it before distutils?
Le jeu. 10 déc. 2020 à 11:51, Matthias Klose <doko@ubuntu.com> a écrit :
lib2to3 is used by distutils/util, so why deprecate it before distutils?
I don't think that it's exclusive. We can deprecate the 2to3 feature in distutils as well. But please don't put a requirement on deprecating distutils to be able to deprecate 2to3: there is the PEP 632 for that. Now I recall that docutils, which is used by Sphinx uses, the 2to3 feature of distutils. I was surprised to see that. This project can run 2to3 once and drop Python 2 support (or use any other tool to keep Python 2 support if they prefer). Victor -- Night gathers, and now my watch begins. It shall not end until my death.
See https://bugs.python.org/issue40360 On Thu, Dec 10, 2020 at 3:01 AM Victor Stinner <vstinner@python.org> wrote:
Le jeu. 10 déc. 2020 à 11:51, Matthias Klose <doko@ubuntu.com> a écrit :
lib2to3 is used by distutils/util, so why deprecate it before distutils?
I don't think that it's exclusive. We can deprecate the 2to3 feature in distutils as well. But please don't put a requirement on deprecating distutils to be able to deprecate 2to3: there is the PEP 632 for that.
Now I recall that docutils, which is used by Sphinx uses, the 2to3 feature of distutils. I was surprised to see that. This project can run 2to3 once and drop Python 2 support (or use any other tool to keep Python 2 support if they prefer).
Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/JMZR5SNO... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>
participants (3)
-
Guido van Rossum
-
Matthias Klose
-
Victor Stinner