aio-libs / aiopg

aiopg is a library for accessing a PostgreSQL database from the asyncio
http://aiopg.readthedocs.io
BSD 2-Clause "Simplified" License
1.39k stars 159 forks source link

Fix pool size limit check for unlimited pools #888

Closed d-ryzhykau closed 1 year ago

d-ryzhykau commented 2 years ago

What do these changes do?

Fix pool size limit check for unlimited connection pools. AS IS: acquiring a connection on a pool with minsize=0, maxsize=0 blocks forever. AS EXPECTED: acquiring a connection on a pool with minsize=0, maxsize=0 returns a created connection.

Are there changes in behavior for the user?

These changes will allow to create a pool with settings minsize=0, maxsize=0.

Related issue number

https://github.com/aio-libs/aiopg/issues/311 - even though the TypeError has been fixed, it is still impossible to use a pool with minsize=0, maxsize=0.

Checklist

Pliner commented 1 year ago

Thanks