]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
feat: add `async_creator` argument to `create_async_engine`
authorJack Wotherspoon <jackwoth@google.com>
Sun, 4 Jun 2023 08:59:23 +0000 (04:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 9 Jun 2023 15:21:40 +0000 (11:21 -0400)
commitdcd938c68eb0bbb33876ab57cf67ba2ef9f9947f
tree5da7bbf9932cdfd8d8febfb55d21f986fd87cb52
parent693b8744ee45ebb65bfcbb9156935ffb2a3ee9ad
feat: add `async_creator` argument to `create_async_engine`

Added new :paramref:`_asyncio.create_async_engine.async_creator` parameter
to :func:`.create_async_engine`, which accomplishes the same purpose as the
:paramref:`.create_engine.creator` parameter of :func:`.create_engine`.
This is a no-argument callable that provides a new asyncio connection,
using the asyncio database driver directly. The
:func:`.create_async_engine` function will wrap the driver-level connection
in the appropriate structures. Pull request curtesy of Jack Wotherspoon.

Fixes #8215
Closes: #9854
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9854
Pull-request-sha: 537073e71e745696f4adb86191b72dd3547b5c95

Change-Id: I184c59ee68436e910464b717f2cbb7e314c1c2cc
doc/build/changelog/unreleased_20/8215.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/aiomysql.py
lib/sqlalchemy/dialects/mysql/asyncmy.py
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/psycopg.py
lib/sqlalchemy/dialects/sqlite/aiosqlite.py
lib/sqlalchemy/ext/asyncio/engine.py
test/ext/asyncio/test_engine_py3k.py