Skip to content

SQLA2.1: compatibility with changes to ScalarAttributeImpl #803

@Dev-iL

Description

@Dev-iL

Hello,

I recently attempted to test the compatibility of Apache Airflow with the SQLAlchemy 2.1 beta. CI reported multiple issues related to sqlalchemy-utils attempting to import sqlalchemy.orm.attributes.ScalarAttributeImpl, e.g.

from sqlalchemy_utils import UUIDType
/usr/python/lib/python3.13/site-packages/sqlalchemy_utils/__init__.py:46: in <module>
    from .generic import generic_relationship  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/python/lib/python3.13/site-packages/sqlalchemy_utils/generic.py:15: in <module>
    class GenericAttributeImpl(attributes.ScalarAttributeImpl):
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   AttributeError: module 'sqlalchemy.orm.attributes' has no attribute 'ScalarAttributeImpl'

See more examples in the CI logs below:

I believe that the breaking change was this:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions