From a1939719a652774a437f69f8d4788b3f08650089 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 19 Aug 2020 12:08:26 -0400 Subject: normalize execute style for events, 2.0 The _execute_20 and exec_driver_sql methods should wrap up the parameters so that they represent the single list / single dictionary style of invocation into the legacy methods. then the before_ after_ execute event handlers should be receiving the parameter dictionary as a single dictionary. this requires that we break out distill_params to work differently if event handlers are present. additionally, add deprecation warnings for old argument passing styles. Change-Id: I97cb4d06adfcc6b889f10d01cc7775925cffb116 --- test/dialect/postgresql/test_query.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'test/dialect/postgresql') diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index 5ab65f9e3..eb96eaabb 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -609,8 +609,7 @@ class InsertTest(fixtures.TestBase, AssertsExecutionResults): (exc.IntegrityError, exc.ProgrammingError), conn.execute, table.insert(), - {"data": "d2"}, - {"data": "d3"}, + [{"data": "d2"}, {"data": "d3"}], ) with expect_warnings( ".*has no Python-side or server-side default.*" @@ -628,14 +627,12 @@ class InsertTest(fixtures.TestBase, AssertsExecutionResults): (exc.IntegrityError, exc.ProgrammingError), conn.execute, table.insert(), - {"data": "d2"}, - {"data": "d3"}, + [{"data": "d2"}, {"data": "d3"}], ) conn.execute( table.insert(), - {"id": 31, "data": "d2"}, - {"id": 32, "data": "d3"}, + [{"id": 31, "data": "d2"}, {"id": 32, "data": "d3"}], ) conn.execute(table.insert(inline=True), {"id": 33, "data": "d4"}) eq_( @@ -668,13 +665,11 @@ class InsertTest(fixtures.TestBase, AssertsExecutionResults): (exc.IntegrityError, exc.ProgrammingError), conn.execute, table.insert(), - {"data": "d2"}, - {"data": "d3"}, + [{"data": "d2"}, {"data": "d3"}], ) conn.execute( table.insert(), - {"id": 31, "data": "d2"}, - {"id": 32, "data": "d3"}, + [{"id": 31, "data": "d2"}, {"id": 32, "data": "d3"}], ) conn.execute(table.insert(inline=True), {"id": 33, "data": "d4"}) eq_( -- cgit v1.2.1