babel fails to build with Python 3.9.0a6: =================================== FAILURES =================================== _ test_parse_future[\nfrom __future__ import print_function,\n division, with_statement,\n unicode_literals\n-237568] _ source = '\nfrom __future__ import print_function,\n division, with_statement,\n unicode_literals\n' result = 237568 @pytest.mark.parametrize('source, result', [ (''' from __future__ import print_function, division, with_statement, unicode_literals ''', 0x10000 | 0x2000 | 0x8000 | 0x20000), (''' from __future__ import print_function, division print('hello') ''', 0x10000 | 0x2000), (''' from __future__ import print_function, division, unknown,,,,, print 'hello' ''', 0x10000 | 0x2000), (''' from __future__ import ( print_function, division) ''', 0x10000 | 0x2000), (''' from __future__ import \\ print_function, \\ division ''', 0x10000 | 0x2000), ]) def test_parse_future(source, result): fp = BytesIO(source.encode('latin-1')) flags = parse_future_flags(fp) > assert flags == result E assert 3801088 == 237568 tests/test_util.py:96: AssertionError _ test_parse_future[\nfrom __future__ import print_function, division\nprint('hello')\n-73728] _ source = "\nfrom __future__ import print_function, division\nprint('hello')\n" result = 73728 @pytest.mark.parametrize('source, result', [ (''' from __future__ import print_function, division, with_statement, unicode_literals ''', 0x10000 | 0x2000 | 0x8000 | 0x20000), (''' from __future__ import print_function, division print('hello') ''', 0x10000 | 0x2000), (''' from __future__ import print_function, division, unknown,,,,, print 'hello' ''', 0x10000 | 0x2000), (''' from __future__ import ( print_function, division) ''', 0x10000 | 0x2000), (''' from __future__ import \\ print_function, \\ division ''', 0x10000 | 0x2000), ]) def test_parse_future(source, result): fp = BytesIO(source.encode('latin-1')) flags = parse_future_flags(fp) > assert flags == result E assert 1179648 == 73728 tests/test_util.py:96: AssertionError _ test_parse_future[\nfrom __future__ import print_function, division, unknown,,,,,\nprint 'hello'\n-73728] _ source = "\nfrom __future__ import print_function, division, unknown,,,,,\nprint 'hello'\n" result = 73728 @pytest.mark.parametrize('source, result', [ (''' from __future__ import print_function, division, with_statement, unicode_literals ''', 0x10000 | 0x2000 | 0x8000 | 0x20000), (''' from __future__ import print_function, division print('hello') ''', 0x10000 | 0x2000), (''' from __future__ import print_function, division, unknown,,,,, print 'hello' ''', 0x10000 | 0x2000), (''' from __future__ import ( print_function, division) ''', 0x10000 | 0x2000), (''' from __future__ import \\ print_function, \\ division ''', 0x10000 | 0x2000), ]) def test_parse_future(source, result): fp = BytesIO(source.encode('latin-1')) flags = parse_future_flags(fp) > assert flags == result E assert 1179648 == 73728 tests/test_util.py:96: AssertionError _ test_parse_future[\nfrom __future__ import (\n print_function,\n division)\n-73728] _ source = '\nfrom __future__ import (\n print_function,\n division)\n' result = 73728 @pytest.mark.parametrize('source, result', [ (''' from __future__ import print_function, division, with_statement, unicode_literals ''', 0x10000 | 0x2000 | 0x8000 | 0x20000), (''' from __future__ import print_function, division print('hello') ''', 0x10000 | 0x2000), (''' from __future__ import print_function, division, unknown,,,,, print 'hello' ''', 0x10000 | 0x2000), (''' from __future__ import ( print_function, division) ''', 0x10000 | 0x2000), (''' from __future__ import \\ print_function, \\ division ''', 0x10000 | 0x2000), ]) def test_parse_future(source, result): fp = BytesIO(source.encode('latin-1')) flags = parse_future_flags(fp) > assert flags == result E assert 1179648 == 73728 tests/test_util.py:96: AssertionError _ test_parse_future[\nfrom __future__ import \\\n print_function, \\\n division\n-73728] _ source = '\nfrom __future__ import \\\n print_function, \\\n division\n' result = 73728 @pytest.mark.parametrize('source, result', [ (''' from __future__ import print_function, division, with_statement, unicode_literals ''', 0x10000 | 0x2000 | 0x8000 | 0x20000), (''' from __future__ import print_function, division print('hello') ''', 0x10000 | 0x2000), (''' from __future__ import print_function, division, unknown,,,,, print 'hello' ''', 0x10000 | 0x2000), (''' from __future__ import ( print_function, division) ''', 0x10000 | 0x2000), (''' from __future__ import \\ print_function, \\ division ''', 0x10000 | 0x2000), ]) def test_parse_future(source, result): fp = BytesIO(source.encode('latin-1')) flags = parse_future_flags(fp) > assert flags == result E assert 1179648 == 73728 tests/test_util.py:96: AssertionError For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01365332-babel/ For all our attempts to build babel with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/babel/ 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. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
babel is very early in the bootstrap sequence, raising severity.
I noticed at least one Python 3.9-related error when doing the setup procedure with an upstream git repo ("AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator'") so I guess we need some fixes upstream. I was a babel developer once but don't have that much time right now so I'd appreciate help. @Nils: Do you have some cycles to check this out? @Miro: This is the first time I became aware that Babel might be need changes for Python 3.9. Did I miss something?
I opened an upstream issue (https://github.com/python-babel/babel/issues/709) - maybe we get some attention to the problem. Still I can't promise a lot of work to debug this.
> @Miro: This is the first time I became aware that Babel might be need changes for Python 3.9. Did I miss something? Not at all. https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/babel/ shows that it built pretty good so far.
I sent a pull request for the import problem (not related to Fedora's build failure but maybe helpful if you try to debug the issue): https://github.com/python-babel/babel/pull/710
probably not interesting but I wanted to add that babel 2.8.0 still works for me with Python 3.9 on Fedora 31. However you need "export TZ='UTC'" before running the test suite.
Actually this was not so hard to fix so I submitted a pull request upstream: https://github.com/python-babel/babel/pull/712 Until upstream fixes this properly I added a patch to the Fedora package in master. Please retest.
Your commit was automatically built in https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/babel/ Thank you.