python-toolz fails to build with Python 3.13.0a1. =================================== FAILURES =================================== _________________________________ test_excepts _________________________________ def test_excepts(): # These are descriptors, make sure this works correctly. assert excepts.__name__ == 'excepts' > assert ( 'A wrapper around a function to catch exceptions and\n' ' dispatch to a handler.\n' ) in excepts.__doc__ E AssertionError: assert 'A wrapper around a function to catch exceptions and\n dispatch to a handler.\n' in 'A wrapper around a function to catch exceptions and\ndispatch to a handler.\n\nThis is like a functional try/except block, in the same way that\nifexprs are functional if/else blocks.\n\nExamples\n--------\n>>> excepting = excepts(\n... ValueError,\n... lambda a: [1, 2].index(a),\n... lambda _: -1,\n... )\n>>> excepting(1)\n0\n>>> excepting(3)\n-1\n\nMultiple exceptions and default except clause.\n>>> excepting = excepts((IndexError, KeyError), lambda a: a[0])\n>>> excepting([])\n>>> excepting([1])\n1\n>>> excepting({})\n>>> excepting({0: 1})\n1\n' E + where 'A wrapper around a function to catch exceptions and\ndispatch to a handler.\n\nThis is like a functional try/except block, in the same way that\nifexprs are functional if/else blocks.\n\nExamples\n--------\n>>> excepting = excepts(\n... ValueError,\n... lambda a: [1, 2].index(a),\n... lambda _: -1,\n... )\n>>> excepting(1)\n0\n>>> excepting(3)\n-1\n\nMultiple exceptions and default except clause.\n>>> excepting = excepts((IndexError, KeyError), lambda a: a[0])\n>>> excepting([])\n>>> excepting([1])\n1\n>>> excepting({})\n>>> excepting({0: 1})\n1\n' = excepts.__doc__ toolz/tests/test_functoolz.py:741: AssertionError =========================== short test summary info ============================ FAILED toolz/tests/test_functoolz.py::test_excepts - AssertionError: assert '... ================= 1 failed, 202 passed, 1 deselected in 4.14s ================== https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06546842-python-toolz/ For all our attempts to build python-toolz with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-toolz/ 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.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. 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.
This is likely related to: https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes """ Compiler now strip indents from docstrings. This will reduce the size of bytecode cache (e.g. .pyc file). For example, cache file size for sqlalchemy.orm.session in SQLAlchemy 2.0 is reduced by about 5%. This change will affect tools using docstrings, like doctest. """ https://github.com/python/cpython/issues/81283 The spaces before "dispatch" are stripped.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
*** Bug 2291948 has been marked as a duplicate of this bug. ***
Fixed in https://bodhi.fedoraproject.org/updates/FEDORA-2024-911758b9a6 .
Thank you!