future fails to build with Python 3.9.0a2. Test failures: ______ TestStandardLibraryReorganization.test_underscore_prefixed_modules ______ self = <test_future.test_standard_library.TestStandardLibraryReorganization testMethod=test_underscore_prefixed_modules> def test_underscore_prefixed_modules(self): import _thread > import _dummy_thread E ModuleNotFoundError: No module named '_dummy_thread' tests/test_future/test_standard_library.py:427: ModuleNotFoundError ______________________ TestFutureMoves.test_future_moves _______________________ self = <test_future.test_standard_library.TestFutureMoves testMethod=test_future_moves> def test_future_moves(self): """ Ensure everything is available from the future.moves interface that we claim and expect. (Issue #104). """ from future.moves.collections import Counter, OrderedDict # backported to Py2.6 from future.moves.collections import UserDict, UserList, UserString from future.moves import configparser from future.moves import copyreg from future.moves.itertools import filterfalse, zip_longest from future.moves import html import future.moves.html.entities import future.moves.html.parser from future.moves import http import future.moves.http.client import future.moves.http.cookies import future.moves.http.cookiejar import future.moves.http.server from future.moves import queue from future.moves import socketserver from future.moves.subprocess import check_output # even on Py2.6 from future.moves.subprocess import getoutput, getstatusoutput from future.moves.sys import intern from future.moves import urllib import future.moves.urllib.error import future.moves.urllib.parse import future.moves.urllib.request import future.moves.urllib.response import future.moves.urllib.robotparser try: # Is _winreg available on Py2? If so, ensure future.moves._winreg is available too: import _winreg except ImportError: pass else: from future.moves import winreg from future.moves import xmlrpc import future.moves.xmlrpc.client import future.moves.xmlrpc.server > from future.moves import _dummy_thread tests/test_future/test_standard_library.py:575: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from __future__ import absolute_import from future.utils import PY3 if PY3: > from _dummy_thread import * E ModuleNotFoundError: No module named '_dummy_thread' build/lib/future/moves/_dummy_thread.py:5: ModuleNotFoundError ________________________ UnquotingTests.test_unquoting _________________________ self = <test_future.test_urllib_toplevel.UnquotingTests testMethod=test_unquoting> def test_unquoting(self): # Make sure unquoting of all ASCII values works escape_list = [] for num in range(128): given = hexescape(chr(num)) expect = chr(num) result = urllib_parse.unquote(given) self.assertEqual(expect, result, "using unquote(): %r != %r" % (expect, result)) result = urllib_parse.unquote_plus(given) self.assertEqual(expect, result, "using unquote_plus(): %r != %r" % (expect, result)) escape_list.append(given) escape_string = ''.join(escape_list) del escape_list result = urllib_parse.unquote(escape_string) self.assertEqual(result.count('%'), 1, "using unquote(): not all characters escaped: " "%s" % result) self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, None) self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, ()) with support.check_warnings(('', BytesWarning), quiet=True): > self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, bytes(b'')) E AssertionError: (<class 'TypeError'>, <class 'AttributeError'>) not raised by unquote tests/test_future/test_urllib_toplevel.py:785: AssertionError For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01142496-future/ For all our attempts to build future with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/future/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started. A build failure this early in the bootstrap sequence blocks us very much.
On Python 3.9 _dummy_thread was removed and _thread is supposed to be used in its place. Also the last test failure is from a test which was copied from Python sources but removed on 3.9 with this change: https://github.com/python/cpython/commit/aad2ee01561f260c69af1951c0d6fcaf75c4d41b I've hacked a bit the code to make it build, but that would be better to be moved upstream as well: diff --git a/future-0.18.0/src/future/moves/_dummy_thread.py b/future-0.18.0/src/future/moves/_dummy_thread.py index 688d249..cc2fc89 100644 --- a/future-0.18.0/src/future/moves/_dummy_thread.py +++ b/future-0.18.0/src/future/moves/_dummy_thread.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from future.utils import PY3 if PY3: - from _dummy_thread import * + from _thread import * else: __future_module__ = True from dummy_thread import * diff --git a/future-0.18.0/src/future/standard_library/__init__.py b/future-0.18.0/src/future/standard_library/__init__.py index cff02f9..3e8da8a 100644 --- a/future-0.18.0/src/future/standard_library/__init__.py +++ b/future-0.18.0/src/future/standard_library/__init__.py @@ -125,7 +125,7 @@ RENAMES = { # 'Tkinter': 'tkinter', '_winreg': 'winreg', 'thread': '_thread', - 'dummy_thread': '_dummy_thread', + 'dummy_thread': '_thread', # 'anydbm': 'dbm', # causes infinite import loop # 'whichdb': 'dbm', # causes infinite import loop # anydbm and whichdb are handled by fix_imports2 diff --git a/future-0.18.0/tests/test_future/test_standard_library.py b/future-0.18.0/tests/test_future/test_standard_library.py index e55876d..5b3a8f3 100644 --- a/future-0.18.0/tests/test_future/test_standard_library.py +++ b/future-0.18.0/tests/test_future/test_standard_library.py @@ -424,7 +424,6 @@ class TestStandardLibraryReorganization(CodeHandler): def test_underscore_prefixed_modules(self): import _thread - import _dummy_thread import _markupbase self.assertTrue(True) diff --git a/future-0.18.0/tests/test_future/test_urllib_toplevel.py b/future-0.18.0/tests/test_future/test_urllib_toplevel.py index 11e7720..25f4ca8 100644 --- a/future-0.18.0/tests/test_future/test_urllib_toplevel.py +++ b/future-0.18.0/tests/test_future/test_urllib_toplevel.py @@ -781,8 +781,6 @@ class UnquotingTests(unittest.TestCase): "%s" % result) self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, None) self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, ()) - with support.check_warnings(('', BytesWarning), quiet=True): - self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, bytes(b'')) def test_unquoting_badpercent(self): # Test unquoting on bad percent-escapes
Upstream does not even support Python-3.8
Antonio, have you talked to upstream? Should we do that instead? I see you have ASSIGNED this bugzilla, so I don't want to do something you are already doing.
I think upstream is not interested to Python 3.9 yet.
Would you carry a downstream only fix then? Or why have you assigned the bugzilla?
The following packages require python3-future. Making it build with Python 3.9 is quite essential for all of those listed. If you need further help with the fix, let us know. $ repoquery --repo=rawhide{,-source} --whatrequires python3-future appliance-tools-0:009.0-10.fc32.noarch buildbot-0:2.5.1-2.fc32.src buildbot-worker-0:2.5.1-2.fc32.noarch cobbler-0:3.1.1-2.fc32.noarch cobbler-0:3.1.1-2.fc32.src duplicity-0:0.8.10-2.fc32.x86_64 kiwi-0:9.19.15-1.fc32.src libolm-0:3.1.4-2.fc32.src libolm-python3-0:3.1.4-2.fc32.x86_64 linkchecker-0:9.4.0-9.20191005.d13b3f5.fc32.noarch linkchecker-0:9.4.0-9.20191005.d13b3f5.fc32.src openqa-0:4.6-41.20200101git68ae00a.fc32.src openqa-devel-0:4.6-41.20200101git68ae00a.fc32.noarch openqa-python-scripts-0:4.6-41.20200101git68ae00a.fc32.noarch preprocess-0:1.2.3-0.15.20170318git6e868bc.fc32.src proselint-0:0.10.2-6.fc32.noarch proselint-0:0.10.2-6.fc32.src python-CommonMark-0:0.9.0-5.fc32.src python-cloudflare-0:2.6.0-1.fc32.src python-cookiecutter-0:1.6.0-12.fc32.src python-dns-lexicon-0:3.3.4-3.fc32.src python-flask-autoindex-0:0.6-10.fc32.src python-ipmi-0:0.4.2-2.fc32.src python-lz4-0:3.0.2-2.fc32.src python-mdp-0:3.5-16.fc32.src python-netssh2-0:0.1.7-7.fc32.src python-okaara-0:1.0.37-13.fc32.src python-onionbalance-0:0.1.8-10.fc32.src python-pymatreader-0:0.0.21-1.fc32.src python-sievelib-0:1.1.1-9.fc32.src python-stestr-0:2.6.0-5.fc32~bootstrap.src python-twitter-0:3.5-6.fc32.src python3-CommonMark-0:0.9.0-5.fc32.noarch python3-brian2-0:2.3-1.fc32.x86_64 python3-cloudflare-0:2.6.0-1.fc32.noarch python3-cookiecutter-0:1.6.0-12.fc32.noarch python3-dns-lexicon-0:3.3.4-3.fc32.noarch python3-fdb-0:2.0.0-6.fc32.noarch python3-flask-autoindex-0:0.6-10.fc32.noarch python3-ipmi-0:0.4.2-2.fc32.noarch python3-mailmerge-0:1.9-6.fc32.noarch python3-mdp-0:3.5-16.fc32.noarch python3-molecule-0:2.22-2.fc32.noarch python3-okaara-0:1.0.37-13.fc32.noarch python3-onionbalance-0:0.1.8-10.fc32.noarch python3-otf2-0:2.2-8.fc32.x86_64 python3-pefile-0:2019.4.18-2.fc32.noarch python3-pyglet-0:1.4.6-2.fc32.noarch python3-pykeepass-0:3.2.0-2.fc32.noarch python3-pymatreader-0:0.0.21-1.fc32.noarch python3-pyqtrailer-0:0.6.2-23.fc32.noarch python3-pysaml2-0:4.5.0-10.fc32.noarch python3-rdopkg-0:1.1.1-2.fc32.noarch python3-sievelib-0:1.1.1-9.fc32.noarch python3-stestr-0:2.6.0-5.fc32~bootstrap.noarch python3-stomper-0:0.4.3-6.fc32.noarch python3-tracer-0:0.7.1-8.fc32.noarch python3-twitter-0:3.5-6.fc32.noarch python3-vertica-0:0.10.1-2.fc32.noarch python3-zanata-client-0:1.5.3-5.fc32.noarch quasselgrep-0:0.1-0.9.20170411git502c88b.fc32.src roca-detect-0:1.2.12-11.fc32.noarch roca-detect-0:1.2.12-11.fc32.src sagemath-0:8.8-7.fc32.src sagemath-core-0:8.8-7.fc32.x86_64 taskotron-trigger-0:0.7.0-6.fc32.noarch taskotron-trigger-0:0.7.0-6.fc32.src
> If you need further help with the fix, let us know. Yes, please. i'm leaving this ticket unassigned.
https://github.com/PythonCharmers/python-future/pull/544 https://src.fedoraproject.org/rpms/future/pull-request/7