Compare commits

...
Author SHA1 Message Date
Claude Code 9db868f0af fix(tests): drop removed subtransactions= kwarg from Session.begin()
TestDatasource.setUp explicitly opened a transaction with
db.session.begin(subtransactions=True) before each test, relying on
tearDown's rollback() to isolate them. subtransactions was already
deprecated in SQLAlchemy 1.4 and is removed outright in 2.0
(TypeError: unexpected keyword argument 'subtransactions'), surfacing
as a failure while investigating discussion #40273's SQLAlchemy 2.0
bump.

The explicit begin() is unnecessary either way: Session autobegins on
first use under both 1.4 and 2.0, so tearDown's rollback() still
correctly discards whatever the test did without it.
2026-08-06 15:03:00 -07:00
@@ -107,9 +107,6 @@ def create_and_cleanup_table(table=None):
class TestDatasource(SupersetTestCase):
def setUp(self):
db.session.begin(subtransactions=True)
def tearDown(self):
db.session.rollback()
super().tearDown()