laughingman7743 / PyAthena

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

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

Closed moshe-shelly closed 8 months ago

moshe-shelly commented 8 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 8 months ago

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