trinodb / trino-python-client

Python client for Trino
Apache License 2.0
309 stars 151 forks source link

_rfc_1738_quote is no longer available in sqlalchemy 1.4.42 #273

Closed tschager closed 1 year ago

tschager commented 1 year ago

Expected behavior

Usage of trino with sqlalchemy 1.4.42.

Actual behavior

Starting from sqlalchemy 1.4.42, the function _rfc_1738_quote has be renamed. This leads to an ImportError when using trino with this version of sqlalchemy.

https://github.com/trinodb/trino-python-client/blob/59473d7998ecb4108d20c4180dce4c7a251707d6/trino/sqlalchemy/util.py#L6

Steps To Reproduce

Import trino 0.318.0 and sqlalchemy 1.4.42

Log output

No response

Operating System

Debian GNU/Linux 11

Trino Python client version

0.318.0

Trino Server version

400

Python version

3.10.0

Are you willing to submit PR?

tschager commented 1 year ago

snowflake-sqlalchemy solved this issue by implementing the version (a two-liner) directly instead of importing it

https://github.com/snowflakedb/snowflake-sqlalchemy/pull/351/files