]> 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:14 +0000 (10:02 -0500)
commitd08322c0189a07a1abcbc119b797cdee0ca94d07
treea5d35b0ab916d7a90142400592dcd2ab5808ea41
parent386e05bed31c00b8fbc77b6255ff8f7dfc71adfc
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
(cherry picked from commit c449505f651ebf4b73aaa7d7aec99b038ea34cb6)
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