altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
195 stars 24 forks source link

The _ConnectionFairy.connection attribute is deprecated #44

Closed mdantonio closed 1 year ago

mdantonio commented 1 year ago

Describe the bug With sqlalchemy 2.0+ a deprecation warning is raised. driver_connection has been introduced with sqlalchemy 1.4.24 and connection has been deprecated in favor of this with sqlachemy 2. Since 1.4.24 is exactly the minimum version required by django-db-connection-pool I hope that the fix can be easily introduced.

Environment

Traceback

  /usr/local/lib/python3.10/site-packages/dj_db_conn_pool/core/mixins.py:104: 
      SADeprecationWarning: The _ConnectionFairy.connection attribute is deprecated;
            please use 'driver_connection' (deprecated since: 2.0)
    self.alias, conn.connection)
pencil commented 6 months ago

@altairbow Thanks for fixing this! Could you please push a new version with this fix to PyPi?

altairbow commented 6 months ago

@altairbow Thanks for fixing this! Could you please push a new version with this fix to PyPi?

Sure, 1.2.5 has been released