python-rich fails to build with Python 3.11.0a4. =================================== FAILURES =================================== ________________________ test_inspect_builtin_function _________________________ def test_inspect_builtin_function(): expected = ( "â•────────── <built-in function print> ───────────╮\n" "│ def print(...) │\n" "│ │\n" "│ print(value, ..., sep=' ', end='\\n', │\n" "│ file=sys.stdout, flush=False) │\n" "│ │\n" "│ 29 attribute(s) not shown. Run │\n" "│ inspect(inspect) for options. │\n" "╰────────────────────────────────────────────────╯\n" ) > assert expected == render(print) E AssertionError: assert 'â•────────── ...──────────╯\n' == 'â•────────── ...──────────╯\n' E â•────────── <built-in function print> ───────────╮ E - │ def print(*args, sep=' ', end='\n', file=None, │ E - │ flush=False): │ E ? ^^^^^^^^^^ -- E + │ def print(...) │ E ? ++ ^^^^^^^^^^ E │ │... E E ...Full output truncated (9 lines hidden), use '-vv' to show tests/test_inspect.py:137: AssertionError ______________________ test_inspect_integer_with_methods _______________________ @skip_py36 @skip_py37 @skip_py38 @skip_py39 def test_inspect_integer_with_methods(): expected = ( "â•──────────────── <class 'int'> ─────────────────╮\n" "│ int([x]) -> integer │\n" "│ int(x, base=10) -> integer │\n" "│ │\n" "│ denominator = 1 │\n" "│ imag = 0 │\n" "│ numerator = 1 │\n" "│ real = 1 │\n" "│ as_integer_ratio = def as_integer_ratio(): │\n" "│ Return integer ratio. │\n" "│ bit_count = def bit_count(): Number of │\n" "│ ones in the binary │\n" "│ representation of the │\n" "│ absolute value of self. │\n" "│ bit_length = def bit_length(): Number of │\n" "│ bits necessary to represent │\n" "│ self in binary. │\n" "│ conjugate = def conjugate(...) Returns │\n" "│ self, the complex conjugate │\n" "│ of any int. │\n" "│ from_bytes = def from_bytes(bytes, │\n" "│ byteorder, *, │\n" "│ signed=False): Return the │\n" "│ integer represented by the │\n" "│ given array of bytes. │\n" "│ to_bytes = def to_bytes(length, │\n" "│ byteorder, *, │\n" "│ signed=False): Return an │\n" "│ array of bytes representing │\n" "│ an integer. │\n" "╰────────────────────────────────────────────────╯\n" ) > assert expected == render(1, methods=True) E AssertionError: assert 'â•───────────...──────────╯\n' == 'â•───────────...──────────╯\n' E â•──────────────── <class 'int'> ─────────────────╮ E │ int([x]) -> integer │ E │ int(x, base=10) -> integer │ E │ │ E │ denominator = 1 │ E │ imag = 0 │ E │ numerator = 1 │... E E ...Full output truncated (34 lines hidden), use '-vv' to show tests/test_inspect.py:242: AssertionError ___________________________________ test_log ___________________________________ def test_log(): expected = replace_link_ids( "\x1b[2;36m[TIME]\x1b[0m\x1b[2;36m \x1b[0m \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m33\x1b[0m\x1b]8;;\x1b\\\n\x1b[2;36m \x1b[0m\x1b[2;36m \x1b[0mHello from \x1b[1m<\x1b[0m\x1b[1;95mconsole\x1b[0m\x1b[39m \x1b[0m\x1b[33mwidth\x1b[0m\x1b[39m=\x1b[0m\x1b[1;36m80\x1b[0m\x1b[39m ColorSystem.TRUECOLOR\x1b[0m\x1b[1m>\x1b[0m ! \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m34\x1b[0m\x1b]8;;\x1b\\\n\x1b[2;36m \x1b[0m\x1b[2;36m \x1b[0m\x1b[1m[\x1b[0m\x1b[1;36m1\x1b[0m, \x1b[1;36m2\x1b[0m, \x1b[1;36m3\x1b[0m\x1b[1m]\x1b[0m \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m35\x1b[0m\x1b]8;;\x1b\\\n \x1b[34mâ•─\x1b[0m\x1b[34m───────────────────── \x1b[0m\x1b[3;34mlocals\x1b[0m\x1b[34m ─────────────────────\x1b[0m\x1b[34m─╮\x1b[0m \n \x1b[34m│\x1b[0m \x1b[3;33mconsole\x1b[0m\x1b[31m =\x1b[0m \x1b[1m<\x1b[0m\x1b[1;95mconsole\x1b[0m\x1b[39m \x1b[0m\x1b[33mwidth\x1b[0m\x1b[39m=\x1b[0m\x1b[1;36m80\x1b[0m\x1b[39m ColorSystem.TRUECOLOR\x1b[0m\x1b[1m>\x1b[0m \x1b[34m│\x1b[0m \n \x1b[34m╰────────────────────────────────────────────────────╯\x1b[0m \n" ) rendered = render_log() print(repr(rendered)) > assert rendered == expected E AssertionError: assert '\x1b[2;36m[T... \n' == '\x1b[2;36m[T... \n' E [TIME] ]8;id=0;foo\source.py]8;;\:]8;id=0;foo\33]8;;\ E - Hello from <console width=80 ColorSystem.TRUECOLOR> ! ]8;id=0;foo\source.py]8;;\:]8;id=0;foo\34]8;;\ E ? ------------ E + H... E E ...Full output truncated (15 lines hidden), use '-vv' to show tests/test_log.py:45: AssertionError ----------------------------- Captured stdout call ----------------------------- '\x1b[2;36m[TIME]\x1b[0m\x1b[2;36m \x1b[0m \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m33\x1b[0m\x1b]8;;\x1b\\\n\x1b[2;36m \x1b[0m\x1b[2;36m \x1b[0mHello from \x1b[1m<\x1b[0m\x1b[1;95mconsole\x1b[0m\x1b[39m \x1b[0m\x1b[33mwidth\x1b[0m\x1b[39m=\x1b[0m\x1b[1;36m80\x1b[0m\x1b[39m TRUECOLOR\x1b[0m\x1b[1m>\x1b[0m ! \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m34\x1b[0m\x1b]8;;\x1b\\\n\x1b[2;36m \x1b[0m\x1b[2;36m \x1b[0m\x1b[1m[\x1b[0m\x1b[1;36m1\x1b[0m, \x1b[1;36m2\x1b[0m, \x1b[1;36m3\x1b[0m\x1b[1m]\x1b[0m \x1b]8;id=0;foo\x1b\\\x1b[2msource.py\x1b[0m\x1b]8;;\x1b\\\x1b[2m:\x1b[0m\x1b]8;id=0;foo\x1b\\\x1b[2m35\x1b[0m\x1b]8;;\x1b\\\n \x1b[34mâ•─\x1b[0m\x1b[34m─────────────── \x1b[0m\x1b[3;34mlocals\x1b[0m\x1b[34m ───────────────\x1b[0m\x1b[34m─╮\x1b[0m \n \x1b[34m│\x1b[0m \x1b[3;33mconsole\x1b[0m\x1b[31m =\x1b[0m \x1b[1m<\x1b[0m\x1b[1;95mconsole\x1b[0m\x1b[39m \x1b[0m\x1b[33mwidth\x1b[0m\x1b[39m=\x1b[0m\x1b[1;36m80\x1b[0m\x1b[39m TRUECOLOR\x1b[0m\x1b[1m>\x1b[0m \x1b[34m│\x1b[0m \n \x1b[34m╰────────────────────────────────────────╯\x1b[0m \n' ______________________________ test_attrs_broken _______________________________ @skip_py36 @skip_py310 def test_attrs_broken(): @attr.define class Foo: bar: int foo = Foo(1) del foo.bar result = pretty_repr(foo) print(repr(result)) expected = "Foo(bar=AttributeError('bar'))" > assert result == expected E assert 'Foo(bar=Attr...te \'bar\'"))' == "Foo(bar=Attr...Error('bar'))" E - Foo(bar=AttributeError('bar')) E + Foo(bar=AttributeError("'Foo' object has no attribute 'bar'")) tests/test_pretty.py:268: AssertionError ----------------------------- Captured stdout call ----------------------------- 'Foo(bar=AttributeError("\'Foo\' object has no attribute \'bar\'"))' __________________________________ test_repr ___________________________________ def test_repr(): assert repr(Segment("foo")) == "Segment('foo')" home = (ControlType.HOME, 0) > assert ( repr(Segment("foo", None, [home])) == "Segment('foo', None, [(<ControlType.HOME: 3>, 0)])" ) E assert "Segment('foo...pe.HOME, 0)])" == "Segment('foo...OME: 3>, 0)])" E - Segment('foo', None, [(<ControlType.HOME: 3>, 0)]) E ? - ---- E + Segment('foo', None, [(ControlType.HOME, 0)]) tests/test_segment.py:13: AssertionError =============================== warnings summary =============================== tests/test_tabulate.py: 17 warnings /builddir/build/BUILD/rich-10.16.1/rich/tabulate.py:32: DeprecationWarning: tabulate_mapping will be deprecated in Rich v11 warnings.warn("tabulate_mapping will be deprecated in Rich v11", DeprecationWarning) -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED tests/test_inspect.py::test_inspect_builtin_function - AssertionError:... FAILED tests/test_inspect.py::test_inspect_integer_with_methods - AssertionEr... FAILED tests/test_log.py::test_log - AssertionError: assert '\x1b[2;36m[T... ... FAILED tests/test_pretty.py::test_attrs_broken - assert 'Foo(bar=Attr...te \'... FAILED tests/test_segment.py::test_repr - assert "Segment('foo...pe.HOME, 0)]... ============ 5 failed, 575 passed, 2 skipped, 17 warnings in 4.96s ============= https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03272362-python-rich/ For all our attempts to build python-rich with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-rich/ 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.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. 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 bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
The faoling tests were disabled, but I leave this open so we can actually fix it later.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
It appears tests are no more failing. See https://kojipkgs.fedoraproject.org//packages/python-rich/13.3.5/2.fc39/data/logs/noarch/build.log tests/test_inspect.py::test_inspect_builtin_function_except_python311 SKIPPED (rendered differently on py3.11) [ 34%] tests/test_inspect.py::test_inspect_integer_with_methods_python38_and_python39 SKIPPED (rendered differently on py3.11) [ 34%] tests/test_log.py::test_log PASSED [ 42%] tests/test_pretty.py::test_attrs_broken SKIPPED (rendered differently on py3.11) [ 54%] tests/test_segment.py::test_repr PASSED [ 66%] I guess we can close this now.