Bug 2479752

Summary: python-dirty-equals fails to build with Python 3.15: test failure related to the changed pprint output defaults
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-dirty-equalsAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, ksurma, mhroncok, paul.wouters, rominf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-dirty-equals-0.11-5.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-05-19 12:23:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description Karolina Surma 2026-05-19 08:32:38 UTC
python-dirty-equals fails to build with Python 3.15.0b1.

_________________________________ test_pprint __________________________________

    def test_pprint():
        v = [IsList(length=...), 1, [IsList(length=...), 2], 3, IsInt()]
        lorem = ['lorem', 'ipsum', 'dolor', 'sit', 'amet'] * 2
        with pytest.raises(AssertionError):
            assert [lorem, 1, [lorem, 2], 3, '4'] == v
    
        assert repr(v) == (f'[{lorem}, 1, [{lorem}, 2], 3, IsInt()]')
>       assert pprint.pformat(v) == (
            "[['lorem',\n"
            "  'ipsum',\n"
            "  'dolor',\n"
            "  'sit',\n"
            "  'amet',\n"
            "  'lorem',\n"
            "  'ipsum',\n"
            "  'dolor',\n"
            "  'sit',\n"
            "  'amet'],\n"
            ' 1,\n'
            " [['lorem',\n"
            "   'ipsum',\n"
            "   'dolor',\n"
            "   'sit',\n"
            "   'amet',\n"
            "   'lorem',\n"
            "   'ipsum',\n"
            "   'dolor',\n"
            "   'sit',\n"
            "   'amet'],\n"
            '  2],\n'
            ' 3,\n'
            ' IsInt()]'
        )
E       assert '[\n    [\n  ...  IsInt(),\n]' == "[['lorem',\n...3,\n IsInt()]"
E         
E         + [
E         +     [
E         - [['lorem',
E         -   'ipsum',
E         -   'dolor',
E         -   'sit',...
E         
E         ...Full output truncated (63 lines hidden), use '-vv' to show

https://docs.python.org/3.15/whatsnew/3.15.html:
pprint now uses modern defaults: indent=4, width=88, and the default compact=False output is now formatted similar to pretty-printed json.dumps(). (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade in gh-112632 and gh-149189.)

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

For all our attempts to build python-dirty-equals with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-dirty-equals/

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-b1/

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 Ben Beasley 2026-05-19 11:13:12 UTC
I decided I wasn’t in the mood to provide a PR to add a second expected string for Python ≥3.15, but I at least reported this upstream clearly. I’ll just skip the test downstream for now. Thank you for the detailed report.

Comment 2 Fedora Update System 2026-05-19 11:25:49 UTC
FEDORA-2026-5d15d9e349 (python-dirty-equals-0.11-5.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-5d15d9e349

Comment 3 Fedora Update System 2026-05-19 12:23:16 UTC
FEDORA-2026-5d15d9e349 (python-dirty-equals-0.11-5.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Karolina Surma 2026-05-25 09:36:17 UTC
Thank you. After more upstream discussion about the breakages, this will be reverted in beta2: https://github.com/python/cpython/pull/150249 - we can reenable the test then.