python-loguru fails to build with Python 3.14.0a6. __________ test_exception_modern[type_hints-minimum_python_version0] ___________ filename = 'type_hints', minimum_python_version = (3, 6) > ??? filename = 'type_hints' minimum_python_version = (3, 6) tests/test_exceptions_formatting.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dirname = 'modern', filename = 'type_hints' def compare_exception(dirname, filename): cwd = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) python = sys.executable or "python" filepath = os.path.join("tests", "exceptions", "source", dirname, filename + ".py") outpath = os.path.join(cwd, "tests", "exceptions", "output", dirname, filename + ".txt") with subprocess.Popen( [python, filepath], shell=False, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, env=dict(os.environ, PYTHONPATH=cwd, PYTHONIOENCODING="utf8"), ) as proc: stdout, stderr = proc.communicate() print(stderr, file=sys.stderr) assert proc.returncode == 0 assert stdout == "" assert stderr != "" stderr = normalize(stderr) # generate(stderr, outpath) with open(outpath, "r") as file: > assert stderr == file.read() E AssertionError: assert '\n\x1b[33m\x...zero\x1b[0m\n' == '\n\x1b[33m\x...zero\x1b[0m\n' E E Skipping 1251 identical leading characters in diff, use -v to show E - mtyping.Union E + m<class 'typing.Union'> E ? ++++++++ ++ E │ │ └ 2 E │ └ 1... E E ...Full output truncated (3 lines hidden), use '-vv' to show cwd = '/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3' dirname = 'modern' file = <_io.TextIOWrapper name='/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3/tests/exceptions/output/modern/type_hints.txt' mode='r' encoding='UTF-8'> filename = 'type_hints' filepath = 'tests/exceptions/source/modern/type_hints.py' outpath = '/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3/tests/exceptions/output/modern/type_hints.txt' proc = <Popen: returncode: 0 args: ['/usr/bin/python3', 'tests/exceptions/source/mo...> python = '/usr/bin/python3' stderr = '\n\x1b[33m\x1b[1mTraceback (most recent call last):\x1b[0m\n\n File "\x1b[32mtests/exceptions/source/modern/\x1b[0m\...x1b[1m<function foo at 0xDEADBEEF>\x1b[0m\n\n\x1b[31m\x1b[1mZeroDivisionError\x1b[0m:\x1b[1m division by zero\x1b[0m\n' stdout = '' tests/test_exceptions_formatting.py:118: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3/tests/exceptions/source/modern/type_hints.py", line 23, in <module> main() └ <function main at 0x7eff7aba7690> File "/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3/tests/exceptions/source/modern/type_hints.py", line 19, in main bar: Name = foo(1, 2, 3) └ <function foo at 0x7eff7aba77f0> File "/builddir/build/BUILD/python-loguru-0.7.3-build/loguru-0.7.3/tests/exceptions/source/modern/type_hints.py", line 15, in foo def foo(a: int, b: Union[Name, float], c: "Name") -> T: 1 / 0 │ │ │ │ │ │ └ ~T │ │ │ │ │ └ 3 │ │ │ │ └ <class 'str'> │ │ │ └ <class 'typing.Union'> │ │ └ 2 │ └ 1 └ <function foo at 0x7eff7aba77f0> ZeroDivisionError: division by zero https://docs.python.org/3.14/whatsnew/3.14.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08837365-python-loguru/ For all our attempts to build python-loguru with Python 3.14, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-loguru/ 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.14: https://copr.fedorainfracloud.org/coprs/g/python/python3.14/ Let us know here if you have any questions. Python 3.14 is planned to be included in Fedora 43. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14. 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.
Reported upstream in https://github.com/Delgan/loguru/issues/1331.
(In reply to Ben Beasley from comment #1) > Reported upstream in https://github.com/Delgan/loguru/issues/1331. Updated the upstream report with details from 3.14.0a7.