-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib2to3 will be removed in Python 3.10 #2086
Comments
Here is what I think might be a path forward: In the next setuptools release, using use_2to3 will become deprecated as well (with no set removal date). On Python 3.10, setuptools will have optional dependency (e.g. via |
I'd prefer simply to drop support for building with 2to3 support and to require those old packages to be built on old versions of setuptools (or not at all). Regardless, let's get the deprecation in ASAP as possible to signal to users to stop using it. |
I'm getting build failures because of this lib2to3 use https://github.com/twisted/ldaptor/runs/1205572060#step:12:103 so I'm in favour of it being removed. note, you could use |
Odds are this was never used by any PBR-based projects, but was included from the beginning to support a feature of Setuptools for a utility which has been long since discouraged. As of Setuptools 46.2.0 and Python 3.9 it's generating deprecation warnings, and is slated for removal from the Python 3.10 standard library. https://bugs.python.org/issue40360 pypa/setuptools#2086 Change-Id: I6972984f29413d2534d802b142fa9323a7e4a4a3
* Update pbr from branch 'master' - Merge "Remove use_2to3 backward compat for Setuptools" - Remove use_2to3 backward compat for Setuptools Odds are this was never used by any PBR-based projects, but was included from the beginning to support a feature of Setuptools for a utility which has been long since discouraged. As of Setuptools 46.2.0 and Python 3.9 it's generating deprecation warnings, and is slated for removal from the Python 3.10 standard library. https://bugs.python.org/issue40360 pypa/setuptools#2086 Change-Id: I6972984f29413d2534d802b142fa9323a7e4a4a3
Upstream issue: pypa/setuptools#2086 git-svn-id: file:///srv/repos/svn-community/svn@753826 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Upstream issue: pypa/setuptools#2086 git-svn-id: file:///srv/repos/svn-community/svn@753826 9fca08f4-af9d-4005-b8df-a31f2cc04f65
lib2to3 is still in Python3.10 as of |
This library does not support Python 3.x because it uses `unicode` and `long` functions in `writer.py`. Fix the problem by using the `use_2to3` option in `setup.py`.
Setuptools has removed support for 2to3 during builds since version 58[1]. But the nose's setup.py relies on use_2to3 option in setuptools, it is failing an import and building without running 2to3 and generating valid python3 code. As a workaround, we use command line 2to3 tool to translate to Python3 code before build it. Fixes: $ python3 >>> import nose Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.10/site-packages/nose/_init_.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/usr/lib/python3.10/site-packages/nose/core.py", line 153 print "%s version %s" % (os.path.basename(sys.argv[0]), _version_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? >>> [1] pypa/setuptools#2086 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Setuptools has removed support for 2to3 during builds since version 58[1]. But the nose's setup.py relies on use_2to3 option in setuptools, it is failing an import and building without running 2to3 and generating valid python3 code. As a workaround, we use command line 2to3 tool to translate to Python3 code before build it. Fixes: $ python3 >>> import nose Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.10/site-packages/nose/_init_.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/usr/lib/python3.10/site-packages/nose/core.py", line 153 print "%s version %s" % (os.path.basename(sys.argv[0]), _version_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? >>> [1] pypa/setuptools#2086 (From OE-Core rev: 11214c2de3282acb3a0fd28884d1a9c54c1c284a) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Setuptools has removed support for 2to3 during builds since version 58[1]. But the nose's setup.py relies on use_2to3 option in setuptools, it is failing an import and building without running 2to3 and generating valid python3 code. As a workaround, we use command line 2to3 tool to translate to Python3 code before build it. Fixes: $ python3 >>> import nose Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.10/site-packages/nose/_init_.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/usr/lib/python3.10/site-packages/nose/core.py", line 153 print "%s version %s" % (os.path.basename(sys.argv[0]), _version_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? >>> [1] pypa/setuptools#2086 (From OE-Core rev: 11214c2de3282acb3a0fd28884d1a9c54c1c284a) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* updated metadata * remove unused imports * remove deprecated argument, see pypa/setuptools#2086
See also #2081
The standard library module lib2to3 is deprecated and will be removed in Python 3.10.
https://bugs.python.org/issue40360
lib2to3 will likely become an external library available from PyPI, but my guess is that setuptools don't want to have more dependencies.
The text was updated successfully, but these errors were encountered: