]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
track state change within _connection_for_bind()
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Jun 2023 15:54:35 +0000 (11:54 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Wed, 21 Jun 2023 17:06:44 +0000 (17:06 +0000)
commit70e0f4c0fae1f7410a55c19e1282d4b4a179adc9
treed7c1db4fef9b45974348b424db0d968b61792cb5
parentf79d09221b1ec6cd6bc8d83d6e947db5f75c6d1c
track state change within _connection_for_bind()

Additional hardening and documentation for the ORM :class:`_orm.Session`
"state change" system, which detects concurrent use of
:class:`_orm.Session` and :class:`_asyncio.AsyncSession` objects; an
additional check is added within the process to acquire connections from
the underlying engine, which is a critical section with regards to internal
connection management.

Change-Id: I6893c53e016218ff6cfb39709179ca4bf73a2414
Fixes: #9973
doc/build/changelog/unreleased_20/9973.rst [new file with mode: 0644]
doc/build/errors.rst
doc/build/orm/extensions/asyncio.rst
doc/build/orm/session_basics.rst
lib/sqlalchemy/ext/asyncio/session.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/state_changes.py