From 5dff93638c4443d3afba017f64c9ade69e0fbd3b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 24 Aug 2009 20:25:25 +0000 Subject: Make PL/Python tests more compatible with Python 3 This changes a bunch of incidentially used constructs in the PL/Python regression tests to equivalent constructs in cases where Python 3 no longer supports the old syntax. Support for older Python versions is unchanged. --- src/pl/plpython/expected/plpython_trigger.out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pl/plpython/expected/plpython_trigger.out') diff --git a/src/pl/plpython/expected/plpython_trigger.out b/src/pl/plpython/expected/plpython_trigger.out index 75914047ce..b60796dab5 100644 --- a/src/pl/plpython/expected/plpython_trigger.out +++ b/src/pl/plpython/expected/plpython_trigger.out @@ -69,10 +69,10 @@ CREATE TABLE trigger_test (i int, v text ); CREATE FUNCTION trigger_data() returns trigger language plpythonu as $$ -if TD.has_key('relid'): +if 'relid' in TD: TD['relid'] = "bogus:12345" -skeys = TD.keys() +skeys = list(TD.keys()) skeys.sort() for key in skeys: val = TD[key] -- cgit v1.2.1