Source: rich
Version: 12.4.4-1
Severity: serious
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: needs-update
User: debian-pyt...@lists.debian.org
Usertags: python3.11
Control: affects -1 src:python3-defaults

Dear maintainer(s),

We are in the transition of adding python3.11 as a supported Python version [0]. With a recent upload of python3-defaults the autopkgtest of rich fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
python3-defaults       from testing    3.10.6-3
rich                   from testing    12.4.4-1
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.11.html lists what's new in Python3.11, it may help to identify what needs to be updated.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[0] https://bugs.debian.org/1021984
[1] https://qa.debian.org/excuses.php?package=python3-defaults

https://ci.debian.net/data/autopkgtest/testing/amd64/r/rich/28796437/log.gz

=================================== FAILURES =================================== ______________________________ test_inspect_text _______________________________

    @skip_pypy3
    def test_inspect_text():
        expected = (
            "╭──────────────── <class 'str'> ─────────────────╮\n"
            "│ str(object='') -> str                          │\n"
            "│ str(bytes_or_buffer[, encoding[, errors]]) ->  │\n"
            "│ str                                            │\n"
            "│                                                │\n"
            "│ 33 attribute(s) not shown. Run                 │\n"
            "│ inspect(inspect) for options.                  │\n"
            "╰────────────────────────────────────────────────╯\n"
        )
        print(repr(expected))
      assert expected == render("Hello")
E AssertionError: assert '╭───────────...──────────╯\n' == '╭───────────...──────────╯\n'
E         Skipping 248 identical leading characters in diff, use -v to show
E         Skipping 140 identical trailing characters in diff, use -v to show
E                │
E         - │ 34 attribut
E         ?    ^
E         + │ 33 attribut
E         ?    ^

tests/test_inspect.py:102: AssertionError
----------------------------- Captured stdout call ----------------------------- "╭──────────────── <class 'str'> ─────────────────╮\n│ str(object='') -> str │\n│ str(bytes_or_buffer[, encoding[, errors]]) -> │\n│ str │\n│ │\n│ 33 attribute(s) not shown. Run │\n│ inspect(inspect) for options. │\n╰────────────────────────────────────────────────╯\n" ________________________ test_inspect_builtin_function _________________________

    @skip_pypy3
    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         Skipping 53 identical leading characters in diff, use -v to show
E         + def print(...)                                 │
E         - def print(*args, sep=' ', end='\n', file=None, │
E         - │ flush=False):                                  │
E           │                                                │
E         - │ Prints the values to a stream, or to           │
E         - │ sys.stdout by default.                         │...
E E ...Full output truncated (10 lines hidden), use '-vv' to show

tests/test_inspect.py:142: 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         Skipping 1091 identical leading characters in diff, use -v to show
E         Skipping 206 identical trailing characters in diff, use -v to show
E         -  byteorder='big', *,         │
E         ?           ------
E         +  byteorder, *,               │
E         ?                        ++++++
E           │                    signed=False): Return the   │...
E E ...Full output truncated (11 lines hidden), use '-vv' to show

tests/test_inspect.py:243: AssertionError
___________________________________ test_log ___________________________________

    def test_log():
        expected = replace_link_ids(
"\x1b[TIME]\x1b\x1b \x1b \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b32\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b \x1bHello from \x1b<\x1b\x1bconsole\x1b\x1b \x1b\x1bwidth\x1b\x1b=\x1b\x1b80\x1b\x1b ColorSystem.TRUECOLOR\x1b\x1b>\x1b ! \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b33\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b \x1b\x1b[\x1b\x1b1\x1b, \x1b2\x1b, \x1b3\x1b\x1b]\x1b \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b34\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b╭─\x1b\x1b───────────────────── \x1b\x1blocals\x1b\x1b ─────────────────────\x1b\x1b─╮\x1b \x1b \x1b\n\x1b \x1b\x1b│\x1b \x1bconsole\x1b\x1b =\x1b \x1b<\x1b\x1bconsole\x1b\x1b \x1b\x1bwidth\x1b\x1b=\x1b\x1b80\x1b\x1b ColorSystem.TRUECOLOR\x1b\x1b>\x1b \x1b│\x1b \x1b \x1b\n\x1b \x1b\x1b╰────────────────────────────────────────────────────╯\x1b \x1b \x1b\n"
        )
        rendered = render_log()
        print(repr(rendered))
      assert rendered == expected
E AssertionError: assert '\x1b[T... \x1b\n' == '\x1b[T... \x1b\n'
E         Skipping 277 identical leading characters in diff, use -v to show
E -  ColorSystem.TRUECOLOR> ! ]8;id=0;foo\source.py]8;;\:]8;id=0;foo\33]8;;\
E         ?           ^^^^^^^^^^ ^^^^^^^^^^
E +  3> ! ]8;id=0;foo\source.py]8;;\:]8;id=0;foo\33]8;;\
E         ?           ^^^ ^^^^^^^^               ++++++++++++++++++++
E   [1, 2, 3] ]8;i... E E ...Full output truncated (13 lines hidden), use '-vv' to show

tests/test_log.py:44: AssertionError
----------------------------- Captured stdout call ----------------------------- '\x1b[TIME]\x1b\x1b \x1b \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b32\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b \x1bHello from \x1b<\x1b\x1bconsole\x1b\x1b \x1b\x1bwidth\x1b\x1b=\x1b\x1b80\x1b\x1b \x1b\x1b3\x1b\x1b>\x1b ! \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b33\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b \x1b\x1b[\x1b\x1b1\x1b, \x1b2\x1b, \x1b3\x1b\x1b]\x1b \x1b]8;id=0;foo\x1b\\\x1bsource.py\x1b\x1b]8;;\x1b\\\x1b:\x1b\x1b]8;id=0;foo\x1b\\\x1b34\x1b\x1b]8;;\x1b\\\n\x1b \x1b\x1b╭─\x1b\x1b─────────── \x1b\x1blocals\x1b\x1b ───────────\x1b\x1b─╮\x1b \x1b \x1b\n\x1b \x1b\x1b│\x1b \x1bconsole\x1b\x1b =\x1b \x1b<\x1b\x1bconsole\x1b\x1b \x1b\x1bwidth\x1b\x1b=\x1b\x1b80\x1b\x1b \x1b\x1b3\x1b\x1b>\x1b \x1b│\x1b \x1b \x1b\n\x1b \x1b\x1b╰────────────────────────────────╯\x1b \x1b \x1b\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:489: AssertionError
----------------------------- Captured stdout call -----------------------------
'Foo(bar=AttributeError("\'Foo\' object has no attribute \'bar\'"))'
=============================== warnings summary ===============================
tests/test_markup.py:147

/tmp/autopkgtest-lxc.v94n7e7e/downtmp/autopkgtest_tmp/tests/test_markup.py:147: DeprecationWarning: invalid escape sequence '\['
    result = str(render("[dim white]\[url=[/]"))

tests/test_traceback.py:52

/tmp/autopkgtest-lxc.v94n7e7e/downtmp/autopkgtest_tmp/tests/test_traceback.py:52: DeprecationWarning: invalid escape sequence '\.'
    "^│ .+rich/tests/test_traceback\.py:",

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================ FAILED tests/test_inspect.py::test_inspect_text - AssertionError: assert '╭──... 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[T... ...
FAILED tests/test_pretty.py::test_attrs_broken - assert 'Foo(bar=Attr...te \'... ============ 5 failed, 648 passed, 19 skipped, 2 warnings in 4.75s =============
autopkgtest [01:16:19]: test unittests

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to