]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
raise for asyncio-incompatible pool classes
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 15 Feb 2024 02:10:20 +0000 (21:10 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Feb 2024 15:02:07 +0000 (10:02 -0500)
commitc449505f651ebf4b73aaa7d7aec99b038ea34cb6
tree3464de9f11c152febda882f1bf59038c03a649c5
parent9b516a9a5fc9e2a1522a5af972bedaeb8926f35b
raise for asyncio-incompatible pool classes

An error is raised if a :class:`.QueuePool` or other non-asyncio pool class
is passed to :func:`_asyncio.create_async_engine`.  This engine only
accepts asyncio-compatible pool classes including
:class:`.AsyncAdaptedQueuePool`. Other pool classes such as
:class:`.NullPool` are compatible with both synchronous and asynchronous
engines as they do not perform any locking.

Fixes: #8771
Change-Id: I5843ccea7d824488492d1a9d46207b9f05330ae3
doc/build/changelog/unreleased_20/8771.rst [new file with mode: 0644]
doc/build/core/pooling.rst
doc/build/errors.rst
lib/sqlalchemy/engine/create.py
lib/sqlalchemy/pool/impl.py
lib/sqlalchemy/testing/engines.py
test/engine/test_execute.py
test/engine/test_transaction.py
test/ext/asyncio/test_engine_py3k.py