]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement async_scoped_session
authorjason3gb <jason3gb@gmail.com>
Wed, 16 Jun 2021 14:18:08 +0000 (10:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 16 Jun 2021 15:19:50 +0000 (11:19 -0400)
commitd06133ba376ba4ab0b7117b2eb72d5fd29a43bb2
tree4d0de5dfbc133db09acd795311bca388424e5051
parent6e22a03b23530eb4bf38f9bce08d030d81d88ccf
Implement async_scoped_session

Implemented :class:`_asyncio.async_scoped_session` to address some
asyncio-related incompatibilities between :class:`_orm.scoped_session` and
:class:`_asyncio.AsyncSession`, in which some methods (notably the
:meth:`_asyncio.async_scoped_session.remove` method) should be used with
the ``await`` keyword.

Fixes: #6583
Closes: #6603
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6603
Pull-request-sha: 0e8ef87dc824dcd83dca01641441afc453c8e07a

Change-Id: I9bfe56f8670302ff0015d9dc56c1e3ac5b92b118
doc/build/changelog/unreleased_14/6583.rst [new file with mode: 0644]
doc/build/orm/contextual.rst
doc/build/orm/extensions/asyncio.rst
lib/sqlalchemy/ext/asyncio/__init__.py
lib/sqlalchemy/ext/asyncio/scoping.py [new file with mode: 0644]
lib/sqlalchemy/orm/scoping.py
test/ext/asyncio/test_scoping_py3k.py [new file with mode: 0644]