From c5b4af959e13f8214121f62f322c668bb178d41f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 15 Jan 2021 18:24:56 -0500 Subject: Guard against re-entrant autobegin in Core, ORM Fixed bug in "future" version of :class:`.Engine` where emitting SQL during the :meth:`.EngineEvents.do_begin` event hook would cause a re-entrant condition due to autobegin, including the recipe documented for SQLite to allow for savepoints and serializable isolation support. Fixed issue in new :class:`_orm.Session` similar to that of the :class:`_engine.Connection` where the new "autobegin" logic could be tripped into a re-entrant state if SQL were executed within the :meth:`.SessionEvents.after_transaction_create` event hook. Also repair the new "testing_engine" pytest fixture to set up for "future" engine appropriately, which wasn't working leading to the test_execute.py tests not using the future engine since recent f1e96cb0874927a475d0c11139. Fixes: #5845 Change-Id: Ib2432d8c8bd753e24be60720ec47affb2df15a4a --- lib/sqlalchemy/testing/fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing/fixtures.py') diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index dcdeee5c9..9141d9b11 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -93,7 +93,7 @@ class TestBase(object): from . import engines def gen_testing_engine( - url=None, options=None, future=False, asyncio=False + url=None, options=None, future=None, asyncio=False ): if options is None: options = {} -- cgit v1.2.1