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.4k stars 160 forks source link

Fix pool size limit check for unlimited pools #888

Closed d-ryzhykau closed 2 years 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 2 years ago

Thanks