Describe the bug
The asynch driver in clickhouse-sqlalchemy has several compatibility gaps:
- asynch 0.3.1+ – Parameter substitution changed from
% formatting to Python .format(), which expects {name} instead of %(name)s. Queries and data containing % can break.
- SQLAlchemy 2.0.44+ – Async cursor must implement
_async_soft_close() for proper cleanup.
- ClickHouse semantics –
commit and rollback are passed to the asynch engine although ClickHouse is non-transactional; these should be no-ops.
To Reproduce
Using the asynch driver with asynch 0.3.1+ and/or SQLAlchemy 2.0.44+ leads to parameter/format errors, deprecation warnings, or cleanup issues depending on versions.
Example: executing a query with bound parameters fails because the driver emits %(name)s while asynch 0.3.1+ expects {name}.
Expected behavior
- Driver works with 0.3.1+ (correct parameter format and Connection usage).
- Compatible with SQLAlchemy 2.0.44+ async cursor lifecycle (
_async_soft_close).
commit/rollback are no-ops.
Versions
- clickhouse-sqlalchemy: current master
- asynch: 0.3.1+
- SQLAlchemy: 2.0.44+
- Python: 3.12
Describe the bug
The asynch driver in clickhouse-sqlalchemy has several compatibility gaps:
%formatting to Python.format(), which expects{name}instead of%(name)s. Queries and data containing%can break._async_soft_close()for proper cleanup.commitandrollbackare passed to the asynch engine although ClickHouse is non-transactional; these should be no-ops.To Reproduce
Using the asynch driver with asynch 0.3.1+ and/or SQLAlchemy 2.0.44+ leads to parameter/format errors, deprecation warnings, or cleanup issues depending on versions.
Example: executing a query with bound parameters fails because the driver emits
%(name)swhile asynch 0.3.1+ expects{name}.Expected behavior
_async_soft_close).commit/rollbackare no-ops.Versions