]> git.ipfire.org Git - thirdparty/psycopg.git/commit
AsyncConnectionPool.open() made async.
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 3 Jan 2022 15:03:48 +0000 (16:03 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 3 Jan 2022 15:41:10 +0000 (16:41 +0100)
commit2e202911f0f0b23e8f5a54cf7cdf2937281c7bcd
tree4ff60d0a860240e05d2dc93c14a13b29d81a59af
parent9b31428b8811fc8a173787add024bb9d6a830eb3
AsyncConnectionPool.open() made async.

This makes it symmetrical with close(). However it doesn't really do any
async work as it's awkward to call it from init. Something we might do,
if that will be needed, could be to start the scheduler only and use it
to schedule immediately a call to an async _open().

In the future, an anyio-based pool might instead disallow open=True on
init.

See https://github.com/psycopg/psycopg/pull/151 for some discussion
about the topic.
psycopg_pool/psycopg_pool/pool_async.py
tests/pool/test_pool_async.py