Skip to content
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

Compatibility with Python-3.13 #640

Open
sagitter opened this issue Apr 23, 2024 · 1 comment
Open

Compatibility with Python-3.13 #640

sagitter opened this issue Apr 23, 2024 · 1 comment

Comments

@sagitter
Copy link

sagitter commented Apr 23, 2024

Hi all.

Please, if reasonable for you, render python-future compatible with newer Python-3.13

uu and lib2to3 modules are no longer available and some tests fail:

==================================== ERRORS ====================================
_________ ERROR collecting tests/test_future/test_email_generation.py __________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_email_generation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_email_generation.py:6: in <module>
    from future.backports.email.mime.multipart import MIMEMultipart
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/mime/multipart.py:12: in <module>
    from future.backports.email.mime.base import MIMEBase
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/mime/base.py:7: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
__________ ERROR collecting tests/test_future/test_email_multipart.py __________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_email_multipart.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_email_multipart.py:6: in <module>
    import future.backports.email.mime.multipart
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/mime/multipart.py:12: in <module>
    from future.backports.email.mime.base import MIMEBase
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/mime/base.py:7: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
_____________ ERROR collecting tests/test_future/test_futurize.py ______________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_futurize.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_futurize.py:9: in <module>
    from libfuturize.fixer_util import is_shebang_comment, is_encoding_comment
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/libfuturize/fixer_util.py:11: in <module>
    from lib2to3.fixer_util import (FromImport, Newline, is_import,
E   ModuleNotFoundError: No module named 'lib2to3'
__________ ERROR collecting tests/test_future/test_http_cookiejar.py ___________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_http_cookiejar.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_http_cookiejar.py:14: in <module>
    import future.backports.urllib.request as urllib_request
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/urllib/request.py:97: in <module>
    from future.backports.http import client as http_client
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/http/client.py:76: in <module>
    from future.backports.email import parser as email_parser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/parser.py:15: in <module>
    from future.backports.email.feedparser import FeedParser, BytesFeedParser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/feedparser.py:32: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
______________ ERROR collecting tests/test_future/test_httplib.py ______________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_httplib.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_httplib.py:14: in <module>
    from future.backports.http import client
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/http/client.py:76: in <module>
    from future.backports.email import parser as email_parser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/parser.py:15: in <module>
    from future.backports.email.feedparser import FeedParser, BytesFeedParser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/feedparser.py:32: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
________ ERROR collecting tests/test_future/test_libfuturize_fixers.py _________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_libfuturize_fixers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_libfuturize_fixers.py:15: in <module>
    from lib2to3 import pygram, pytree, refactor, fixer_util
E   ModuleNotFoundError: No module named 'lib2to3'
______________ ERROR collecting tests/test_future/test_urllib.py _______________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_urllib.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_urllib.py:14: in <module>
    from future.backports.urllib import request as urllib_request
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/urllib/request.py:97: in <module>
    from future.backports.http import client as http_client
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/http/client.py:76: in <module>
    from future.backports.email import parser as email_parser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/parser.py:15: in <module>
    from future.backports.email.feedparser import FeedParser, BytesFeedParser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/feedparser.py:32: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
______________ ERROR collecting tests/test_future/test_urllib2.py ______________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_future/test_urllib2.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_future/test_urllib2.py:11: in <module>
    import future.backports.urllib.request as urllib_request
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/urllib/request.py:97: in <module>
    from future.backports.http import client as http_client
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/http/client.py:76: in <module>
    from future.backports.email import parser as email_parser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/parser.py:15: in <module>
    from future.backports.email.feedparser import FeedParser, BytesFeedParser
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/feedparser.py:32: in <module>
    from future.backports.email import message
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/future/backports/email/message.py:13: in <module>
    import uu
E   ModuleNotFoundError: No module named 'uu'
_____________ ERROR collecting tests/test_past/test_translation.py _____________
ImportError while importing test module '/builddir/build/BUILD/python-future-0.18.3/tests/test_past/test_translation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_past/test_translation.py:19: in <module>
    from past.translation import install_hooks, remove_hooks, common_substring
../../BUILDROOT/future-0.18.3-8.fc40.x86_64/usr/lib/python3.13/site-packages/past/translation/__init__.py:41: in <module>
    from lib2to3.pgen2.parse import ParseError
E   ModuleNotFoundError: No module named 'lib2to3'

=========================== short test summary info ============================
ERROR tests/test_future/test_email_generation.py
ERROR tests/test_future/test_email_multipart.py
ERROR tests/test_future/test_futurize.py
ERROR tests/test_future/test_http_cookiejar.py
ERROR tests/test_future/test_httplib.py
ERROR tests/test_future/test_libfuturize_fixers.py
ERROR tests/test_future/test_urllib.py
ERROR tests/test_future/test_urllib2.py
ERROR tests/test_past/test_translation.py
!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!
nsoranzo added a commit to nsoranzo/python-future that referenced this issue Sep 19, 2024
which is being removed in Python 3.13, by backporting
python/cpython@407c3af

Partial fix for PythonCharmers#640 .

Also:
- Backport small fixes from upstream `email` library module
- Remove unused imports
@nsoranzo
Copy link
Contributor

I've opened #644 to get rid of uu.
For lib2to3, we may consider adding to the backports or replace with https://github.com/amyreese/fissix .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants