]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
generalize scoped_session proxying and apply to asyncio elements
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Oct 2020 19:20:48 +0000 (15:20 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 10 Oct 2020 05:17:25 +0000 (01:17 -0400)
commit2665a0c4cb3e94e6545d0b9bbcbcc39ccffebaba
treeed25383ce7e5899d7d643a11df0f8aee9f2ab959
parentbcc17b1d6e2cac3b0e45c0b17a62cf2d5fc5c5ab
generalize scoped_session proxying and apply to asyncio elements

Reworked the proxy creation used by scoped_session() to be
based on fully copied code with augmented docstrings and
moved it into langhelpers.  asyncio session, engine,
connection can now take
advantage of it so that all non-async methods are availble.

Overall implementation of most important accessors / methods
on AsyncConnection, etc. , including awaitable versions
of invalidate, execution_options, etc.

In order to support an event dispatcher on the async
classes while still allowing them to hold __slots__,
make some adjustments to the event system to allow
that to be present, at least rudimentally.

Fixes: #5628
Change-Id: I5eb6929fc1e4fdac99e4b767dcfd49672d56e2b2
19 files changed:
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/event/base.py
lib/sqlalchemy/ext/asyncio/__init__.py
lib/sqlalchemy/ext/asyncio/engine.py
lib/sqlalchemy/ext/asyncio/events.py [new file with mode: 0644]
lib/sqlalchemy/ext/asyncio/session.py
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/scoping.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/pool/base.py
lib/sqlalchemy/testing/plugin/pytestplugin.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/langhelpers.py
test/base/test_events.py
test/base/test_utils.py
test/ext/asyncio/test_engine_py3k.py
test/ext/asyncio/test_session_py3k.py
test/orm/test_scoping.py
test/orm/test_session.py