Bug 2479750

Summary: python-sqlalchemy1.4 fails to build with Python 3.15: test failures related to the changed pprint output
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-sqlalchemy1.4Assignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mhroncok, nphilipp
Target Milestone: ---Flags: fedora-admin-xmlrpc: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-sqlalchemy1.4-1.4.54-11.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-05-19 14:24:32 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:09:44 UTC
python-sqlalchemy1.4 fails to build with Python 3.15.0b1.

File "orm/queryguide.rst", line 1158, in orm/queryguide.rst
Failed example:
    pprint(stmt.column_descriptions)
Expected:
    [{'aliased': False,
        'entity': <class 'User'>,
        'expr': <class 'User'>,
        'name': 'User',
        'type': <class 'User'>},
        {'aliased': False,
        'entity': <class 'User'>,
        'expr': <....InstrumentedAttribute object at ...>,
        'name': 'id',
        'type': Integer()},
        {'aliased': True,
        'entity': <AliasedClass ...; User>,
        'expr': <AliasedClass ...; User>,
        'name': 'user2',
        'type': <class 'User'>}]
Got:
    [
        {
            'aliased': False,
            'entity': <class 'User'>,
            'expr': <class 'User'>,
            'name': 'User',
            'type': <class 'User'>,
        },
        {
            'aliased': False,
            'entity': <class 'User'>,
            'expr': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f1ed9f23110>,
            'name': 'id',
            'type': Integer(),
        },
        {
            'aliased': True,
            'entity': <AliasedClass at 0x7f1eada58450; User>,
            'expr': <AliasedClass at 0x7f1eada58450; User>,
            'name': 'user2',
            'type': <class 'User'>,
        },
    ]
**********************************************************************
File "orm/queryguide.rst", line 1182, in orm/queryguide.rst
Failed example:
    pprint(stmt.column_descriptions)
Expected:
    [{'expr': Column('id', Integer(), table=<user_account>, primary_key=True, nullable=False),
        'name': 'id',
        'type': Integer()},
        {'expr': Column('name', String(length=30), table=<user_account>),
        'name': 'name',
        'type': String(length=30)},
        {'expr': Column('fullname', String(), table=<user_account>),
        'name': 'fullname',
        'type': String()},
        {'expr': Column('id', Integer(), table=<address>, primary_key=True, nullable=False),
        'name': 'id_1',
        'type': Integer()}]
Got:
    [
        {
            'expr': Column('id', Integer(), table=<user_account>, primary_key=True, nullable=False),
            'name': 'id',
            'type': Integer(),
        },
        {
            'expr': Column('name', String(length=30), table=<user_account>),
            'name': 'name',
            'type': String(length=30),
        },
        {
            'expr': Column('fullname', String(), table=<user_account>),
            'name': 'fullname',
            'type': String(),
        },
        {
            'expr': Column('id', Integer(), table=<address>, primary_key=True, nullable=False),
            'name': 'id_1',
            'type': Integer(),
        },
    ]
**********************************************************************
File "orm/queryguide.rst", line 1208, in orm/queryguide.rst
Failed example:
    pprint(stmt.entity_description)
Expected:
    {'entity': <class 'User'>,
        'expr': <class 'User'>,
        'name': 'User',
        'table': Table('user_account', ...),
        'type': <class 'User'>}
Got:
    {
        'entity': <class 'User'>,
        'expr': <class 'User'>,
        'name': 'User',
        'table': Table('user_account', MetaData(), Column('id', Integer(), table=<user_account>, primary_key=True, nullable=False), Column('name', String(length=30), table=<user_account>), Column('fullname', String(), table=<user_account>), schema=None),
        'type': <class 'User'>,
    }
**********************************************************************
File "orm/queryguide.rst", line 1226, in orm/queryguide.rst
Failed example:
    pprint(stmt.returning_column_descriptions)
Expected:
    [{'aliased': False,
        'entity': <class 'User'>,
        'expr': <sqlalchemy.orm.attributes.InstrumentedAttribute ...>,
        'name': 'id',
        'type': Integer()}]
Got:
    [
        {
            'aliased': False,
            'entity': <class 'User'>,
            'expr': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f1ed9f23110>,
            'name': 'id',
            'type': Integer(),
        },
    ]

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/10477971-python-sqlalchemy1.4/

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

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 Nils Philippsen 2026-05-19 14:24:32 UTC
I’ve changed the spec file to just skip doc tests here:

https://src.fedoraproject.org/rpms/python-sqlalchemy1.4/c/601d3a6f979e4837792d0da7cfb1d5b8c1618f7d?branch=rawhide

I won’t build, assuming that for the moment this is only necessary for the COPR test builds.

Comment 2 Karolina Surma 2026-05-25 09:34:11 UTC
Thank you. After more upstream discussion about the breakages, this will be reverted in beta2: https://github.com/python/cpython/pull/150249 - I'll try reenabling the test and verify it.

Comment 4 Fedora Update System 2026-06-16 09:40:53 UTC
FEDORA-2026-7a03f16d31 (python-sqlalchemy1.4-1.4.54-11.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-7a03f16d31

Comment 5 Fedora Update System 2026-06-16 09:43:15 UTC
FEDORA-2026-7a03f16d31 (python-sqlalchemy1.4-1.4.54-11.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.