diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-19 12:08:26 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-20 10:14:21 -0400 |
| commit | a1939719a652774a437f69f8d4788b3f08650089 (patch) | |
| tree | 309b7423fc4fa919af7af2bb9da81be824ccda87 /test/dialect/postgresql | |
| parent | 0901190bb440580f0664fe3f6310173762b908e0 (diff) | |
| download | sqlalchemy-a1939719a652774a437f69f8d4788b3f08650089.tar.gz | |
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
Diffstat (limited to 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_query.py | 15 |
1 files changed, 5 insertions, 10 deletions
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_( |
