From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Modernize Python exception syntax in tests
Date: Wed, 08 Jan 2020 21:59:13 +0000
Message-ID: <E1ipJM9-0003qn-Et@gemulon.postgresql.org> (raw)
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@sss.pgh.pa.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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Modernize Python exception syntax in tests
In-Reply-To: <E1ipJM9-0003qn-Et@gemulon.postgresql.org>
References: <E1ipJM9-0003qn-Et@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox