From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Modernize Python exception syntax in tests |
Date: | 2020-01-08 21:59:13 |
Message-ID: | E1ipJM9-0003qn-Et@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Modernize Python exception syntax in tests
Change the exception syntax used in the tests to use the more current
except Exception as ex:
rather than the old
except Exception, ex:
Since support for Python <2.6 has been removed, all supported versions
now support the new style, and we can save one step in the Python 3
compatibility conversion.
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://www.postgresql.org/message-id/flat/98b69261-298c-13d2-f34d-836fd9c29b21%402ndquadrant.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/45223fd9cefe483daa4af7740f15c004486636eb
Modified Files
--------------
src/pl/plpython/expected/plpython_ereport.out | 4 ++--
src/pl/plpython/expected/plpython_error.out | 8 ++++----
src/pl/plpython/expected/plpython_import.out | 2 +-
src/pl/plpython/expected/plpython_params.out | 2 +-
src/pl/plpython/expected/plpython_spi.out | 6 +++---
src/pl/plpython/expected/plpython_subtransaction.out | 2 +-
src/pl/plpython/expected/plpython_types.out | 2 +-
src/pl/plpython/regress-python3-mangle.mk | 2 +-
src/pl/plpython/sql/plpython_ereport.sql | 4 ++--
src/pl/plpython/sql/plpython_error.sql | 8 ++++----
src/pl/plpython/sql/plpython_import.sql | 2 +-
src/pl/plpython/sql/plpython_params.sql | 2 +-
src/pl/plpython/sql/plpython_spi.sql | 6 +++---
src/pl/plpython/sql/plpython_subtransaction.sql | 2 +-
src/pl/plpython/sql/plpython_types.sql | 2 +-
src/tools/msvc/vcregress.pl | 1 -
16 files changed, 27 insertions(+), 28 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-01-08 22:31:06 | Re: src/test/recovery regression failure on bionic |
Previous Message | Alvaro Herrera | 2020-01-08 17:34:18 | pgsql: Reimplement nullification of walsender timestamp |