pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Modernize Python exception syntax in documentation
2+ messages / 1 participants
[nested] [flat]

* pgsql: Modernize Python exception syntax in documentation
@ 2019-12-31 09:44  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2019-12-31 09:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Modernize Python exception syntax in documentation

Change the exception syntax used in the documentation to use the more
current

    except Exception as ex:

rather than the old

    except Exception, ex:

We keep the old syntax in the test code since Python <2.6 is still
supported there, but the documentation might as well use the modern
syntax.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b55413d77f96b9fa2dfae4ddec43412b90ebf588

Modified Files
--------------
doc/src/sgml/plpython.sgml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Modernize Python exception syntax in tests
@ 2020-01-08 21:59  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2020-01-08 21:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.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

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-01-08 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 09:44 pgsql: Modernize Python exception syntax in documentation Peter Eisentraut <peter@eisentraut.org>
2020-01-08 21:59 pgsql: Modernize Python exception syntax in tests Peter Eisentraut <peter@eisentraut.org>

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