GoogleCloudPlatform / cloud-sql-python-connector

A Python library for connecting securely to your Cloud SQL instances.
Apache License 2.0
286 stars 67 forks source link

feat: support native asyncpg connection pools #1182

Closed jackwotherspoon closed 4 weeks ago

jackwotherspoon commented 4 weeks ago

As of asyncpg v0.30.0, asyncpg native connection pools now support a creation function (callable) via its connect argument, similar to SQLAlchemy's async_creator argument to generate connections.

Adding integration test and usage samples to README.

Also bumping asyncpg min supported version in setup.py to 0.30.0 to force supported version for this feature.

Closes #1180

jackwotherspoon commented 4 weeks ago

cc @d1manson if you want to let me know if this looks good to you? 😄