laughingman7743 / PyAthena

PyAthena is a Python DB API 2.0 (PEP 249) client for Amazon Athena.
MIT License
456 stars 102 forks source link

[Warning] SADeprecationWarning: The dbapi() classmethod on dialect classes has been renamed to import_dbapi(). #528

Closed moshe-shelly closed 3 months ago

moshe-shelly commented 3 months ago

I'm using the library via SQLDatabase (from langchain_community.utilities)

Getting the following warning:

SADeprecationWarning: The dbapi() classmethod on dialect classes has been renamed to import_dbapi(). Implement an import_dbapi() classmethod directly on class <class 'pyathena.sqlalchemy.rest.AthenaRestDialect'> to remove this warning; the old .dbapi() classmethod may be maintained for backwards compatibility.

I think this here is where the change should be implemented: https://github.com/laughingman7743/PyAthena/blob/cb901047861cda020d481430d08699300e61831d/pyathena/sqlalchemy/base.py#L1016

Thanks!

laughingman7743 commented 3 months ago

https://github.com/laughingman7743/PyAthena/issues/496