Modernize Python exception syntax in tests
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/expected/plpython_ereport.out | modified | +2 −2 |
| src/pl/plpython/expected/plpython_error.out | modified | +4 −4 |
| src/pl/plpython/expected/plpython_import.out | modified | +1 −1 |
| src/pl/plpython/expected/plpython_params.out | modified | +1 −1 |
| src/pl/plpython/expected/plpython_spi.out | modified | +3 −3 |
| src/pl/plpython/expected/plpython_subtransaction.out | modified | +1 −1 |
| src/pl/plpython/expected/plpython_types.out | modified | +1 −1 |
| src/pl/plpython/regress-python3-mangle.mk | modified | +1 −1 |
| src/pl/plpython/sql/plpython_ereport.sql | modified | +2 −2 |
| src/pl/plpython/sql/plpython_error.sql | modified | +4 −4 |
| src/pl/plpython/sql/plpython_import.sql | modified | +1 −1 |
| src/pl/plpython/sql/plpython_params.sql | modified | +1 −1 |
| src/pl/plpython/sql/plpython_spi.sql | modified | +3 −3 |
| src/pl/plpython/sql/plpython_subtransaction.sql | modified | +1 −1 |
| src/pl/plpython/sql/plpython_types.sql | modified | +1 −1 |
| src/tools/msvc/vcregress.pl | modified | +0 −1 |
Discussion
- remove support for old Python versions 8 messages · 2019-12-09 → 2020-01-15