Bug 2431601 - python-rich fails to build with Python 3.15: AssertionError in test_inspect_builtin_function_only_python311
Summary: python-rich fails to build with Python 3.15: AssertionError in test_inspect_b...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rich
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-01-21 13:47 UTC by Karolina Surma
Modified: 2026-04-20 12:53 UTC (History)
4 users (show)

Fixed In Version: python-rich-15.0.0-2.fc45
Clone Of:
Environment:
Last Closed: 2026-04-20 12:53:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-01-21 13:47:51 UTC
python-rich fails to build with Python 3.15.0a5.

_________________ test_inspect_builtin_function_only_python311 _________________

    @pytest.mark.skipif(
        sys.version_info < (3, 11), reason="print builtin signature only available on 3.11+"
    )
    @skip_pypy3
    def test_inspect_builtin_function_only_python311():
        # On 3.11, the print builtin *does* have a signature, unlike in prior versions
        expected = (
            "╭────────── <built-in function print> ───────────╮\n"
            "│ def print(*args, sep=' ', end='\\n', file=None, │\n"
            "│ flush=False):                                  │\n"
            "│                                                │\n"
            "│ Prints the values to a stream, or to           │\n"
            "│ sys.stdout by default.                         │\n"
            "│                                                │\n"
            "│ 30 attribute(s) not shown. Run                 │\n"
            "│ inspect(inspect) for options.                  │\n"
            "╰────────────────────────────────────────────────╯\n"
        )
>       assert render(print) == expected
E       assert "╭────────── <built-in function print> ───────────╮\n│ def print(*objects, sep=' ', end='\\n',         │\n│ file=None, flush=False):                       │\n│                                                │\n│ Prints the values to a stream, or to           │\n│ sys.stdout by default.                         │\n│                                                │\n│ 30 attribute(s) not shown. Run                 │\n│ inspect(inspect) for options.                  │\n╰────────────────────────────────────────────────╯\n" == "╭────────── <built-in function print> ───────────╮\n│ def print(*args, sep=' ', end='\\n', file=None, │\n│ flush=False):                                  │\n│                                                │\n│ Prints the values to a stream, or to           │\n│ sys.stdout by default.                         │\n│                                                │\n│ 30 attribute(s) not shown. Run                 │\n│ inspect(inspect) for options.                  │\n╰────────────────────────────────────────────────╯\n"
E         
E           ╭────────── <built-in function print> ───────────╮
E         - │ def print(*args, sep=' ', end='\n', file=None, │
E         + │ def print(*objects, sep=' ', end='\n',         │
E         - │ flush=False):                                  │
E         ?                                       -----------
E         + │ file=None, flush=False):                       │
E         ?  +++++++++++
E           │                                                │
E           │ Prints the values to a stream, or to           │
E           │ sys.stdout by default.                         │
E           │                                                │
E           │ 30 attribute(s) not shown. Run                 │
E           │ inspect(inspect) for options.                  │
E           ╰────────────────────────────────────────────────╯

tests/test_inspect.py:187: AssertionError

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10038659-python-rich/

For all our attempts to build python-rich with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/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.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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.

Comment 1 Steve Traylen 2026-04-16 14:44:21 UTC
Let see if https://github.com/Textualize/rich/pull/4082 is accepted.

Comment 3 Fedora Update System 2026-04-20 12:49:34 UTC
FEDORA-2026-46ab8c26f1 (python-rich-15.0.0-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-46ab8c26f1

Comment 4 Fedora Update System 2026-04-20 12:53:58 UTC
FEDORA-2026-46ab8c26f1 (python-rich-15.0.0-2.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.