You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plan to open a PR soon. I already did a patch on a local fork of clickhouse-sqlalchemy that solve the problem.
To Reproduce
A minimal reproduction is to execute this python script directly with alembic 1.15
fromalembic.utilimportsqla_compat# uncomment next line to make it work with alembic >=1.15# sqla_compat._reflect_table = lambda inspector, table, include_cols: inspector.reflect_table(table, None)fromclickhouse_sqlalchemy.alembic.dialectimportinclude_object, patch_alembic_versionprint("OK")
Traceback (most recent call last):
File ".../alembic/env.py", line 5, in <module>
from clickhouse_sqlalchemy.alembic.dialect import include_object, patch_alembic_version
File "clickhouse-sqlalchemy/clickhouse_sqlalchemy/alembic/dialect.py", line 13, in <module>
from .comparators import compare_mat_view
File "clickhouse-sqlalchemy/clickhouse_sqlalchemy/alembic/comparators.py", line 7, in <module>
from alembic.util.sqla_compat import _reflect_table as _alembic_reflect_table
ImportError: cannot import name '_reflect_table' from 'alembic.util.sqla_compat'
Expected behavior
imports should works
Versions
alembic==1.15.1
clickhouse-sqlalchemy==0.3.2
Python 3.12.8
The text was updated successfully, but these errors were encountered:
thomas-dufour
pushed a commit
to thomas-dufour/clickhouse-sqlalchemy
that referenced
this issue
Mar 7, 2025
Describe the bug
Alembic version 1.15 removed function
_reflect_table
from alembic/util/sqla_compat.py. This prevents the import ofclickhouse_sqlalchemy.alembic.dialect
in my alembic/env.py file as I was taking example on https://github.com/xzkostyan/clickhouse-sqlalchemy-alembic-example/blob/main/simple/migrations/env.py.I plan to open a PR soon. I already did a patch on a local fork of clickhouse-sqlalchemy that solve the problem.
To Reproduce
A minimal reproduction is to execute this python script directly with alembic 1.15
Expected behavior
imports should works
Versions
The text was updated successfully, but these errors were encountered: