Bug 2339510 - python-rich fails to build with Python 3.14: 5 test fail
Summary: python-rich fails to build with Python 3.14: 5 test fail
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rich
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-01-22 15:46 UTC by Karolina Surma
Modified: 2025-02-26 13:25 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Textualize rich pull 3622 0 None open Skip tests which are expected to fail with Python 3.14 2025-01-28 12:53:28 UTC

Description Karolina Surma 2025-01-22 15:46:31 UTC
python-rich fails to build with Python 3.14.0a4.

5 tests fail with quite a verbose output:
FAILED tests/test_inspect.py::test_inspect_integer_with_methods_python311 - assert "╭──────────────── <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 a pair of integers,  │\n│                    whose ratio is equal to the │\n│                    original int.               │\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='big', *,         │\n│                    signed=False): Return the   │\n│                    integer represented by the  │\n│                    given array of bytes.       │\n│       is_integer = def is_integer(): Returns   │\n│                    True. Exists for duck type  │\n│                    compatibility with          │\n│                    float.is_integer.           │\n│         to_bytes = def to_bytes(length=1,      │\n│                    byteorder='big', *,         │\n│                    signed=False): Return an    │\n│                    array of bytes representing │\n│                    an integer.                 │\n╰────────────────────────────────────────────────╯\n" == "╭──────────────── <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='big', *,         │\n│                    signed=False): Return the   │\n│                    integer represented by the  │\n│                    given array of bytes.       │\n│         to_bytes = def to_bytes(length=1,      │\n│                    byteorder='big', *,         │\n│                    signed=False): Return an    │\n│                    array of bytes representing │\n│                    an integer.                 │\n╰────────────────────────────────────────────────╯\n"
  
    ╭──────────────── <class 'int'> ─────────────────╮
    │ int([x]) -> integer                            │
    │ int(x, base=10) -> integer                     │
    │                                                │
    │      denominator = 1                           │
    │             imag = 0                           │
    │        numerator = 1                           │
    │             real = 1                           │
    │ as_integer_ratio = def as_integer_ratio():     │
  - │                    Return integer ratio.       │
  ?                                    ^^^^^^^^^^^^
  + │                    Return a pair of integers,  │
  ?                            ++++++++++        ^^
  + │                    whose ratio is equal to the │
  + │                    original int.               │
    │        bit_count = def bit_count(): Number of  │
    │                    ones in the binary          │
    │                    representation of the       │
    │                    absolute value of self.     │
    │       bit_length = def bit_length(): Number of │
    │                    bits necessary to represent │
    │                    self in binary.             │
  - │        conjugate = def conjugate(...) Returns  │
  ?                                    ---
  + │        conjugate = def conjugate(): Returns    │
  ?                                     +          ++
    │                    self, the complex conjugate │
    │                    of any int.                 │
    │       from_bytes = def from_bytes(bytes,       │
    │                    byteorder='big', *,         │
    │                    signed=False): Return the   │
    │                    integer represented by the  │
    │                    given array of bytes.       │
  + │       is_integer = def is_integer(): Returns   │
  + │                    True. Exists for duck type  │
  + │                    compatibility with          │
  + │                    float.is_integer.           │
    │         to_bytes = def to_bytes(length=1,      │
    │                    byteorder='big', *,         │
    │                    signed=False): Return an    │
    │                    array of bytes representing │
    │                    an integer.                 │
    ╰────────────────────────────────────────────────╯
FAILED tests/test_pretty.py::test_attrs_broken - assert 'Foo(\n    bar=AttributeError("\'tests.test_pretty.test_attrs_broken.<locals>.Foo\' object has no attribute \'bar\'")\n)' == "Foo(bar=AttributeError('bar'))"
  
  - Foo(bar=AttributeError('bar'))
  + Foo(
  +     bar=AttributeError("'tests.test_pretty.test_attrs_broken.<locals>.Foo' object has no attribute 'bar'")
  + )

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/08555006-python-rich/

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

Comment 1 Karolina Surma 2025-01-28 12:53:29 UTC
I posted the annual update upstream: https://github.com/Textualize/rich/pull/3622

Comment 2 Aoife Moloney 2025-02-26 13:25:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


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