python-gino / gino

GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
https://python-gino.org/
Other
2.67k stars 150 forks source link

Make `reuse` configurable on init #768

Closed coetzeevs closed 10 months ago

coetzeevs commented 3 years ago

Context: This discussion topic has most (if not all) the context. It boils down to the following: When instantiating an instance of Gino via the API (when using something like gino-starlette) it'd be beneficial to be able to set the connection reuse behaviour explicitly for the connection pool. These changes achieves that whilst maintaining the functionality before the changes are applied.

Value: Make Gino more usable for this specific usecase, but add more flexibility in the functionality of the underlying package when using it via the API.

Changes:

Tests passing: Tests passing in the as-is state. No new tests added as there are already tests in place to check the use of reuse flag.