Mapper[aliased_class] imports do not behave Minimal code example to highlight issue sqlalchemy/sqlalchemy#8755 in SQLAlchemy 2. See the comments in ./models/a.py.