pgsql: Fix subtransaction test for Python 3.10

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Fix subtransaction test for Python 3.10
Дата
Msg-id E1ltm5L-0006yN-QG@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix subtransaction test for Python 3.10

Starting with Python 3.10, the stacktrace looks differently:
  -  PL/Python function "subtransaction_exit_subtransaction_in_with", line 3, in <module>
  -    s.__exit__(None, None, None)
  +  PL/Python function "subtransaction_exit_subtransaction_in_with", line 2, in <module>
  +    with plpy.subtransaction() as s:
Using try/except specifically makes the error look always the same.

(See https://github.com/python/cpython/pull/25719 for the discussion
of this change in Python.)

Author: Honza Horak <hhorak@redhat.com>
Discussion: https://www.postgresql.org/message-id/flat/853083.1620749597%40sss.pgh.pa.us
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1959080

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3989f8fb9dd84afda7e27de04bf83e31903d46ba

Modified Files
--------------
src/pl/plpython/expected/plpython_subtransaction.out | 11 +++++++----
src/pl/plpython/sql/plpython_subtransaction.sql      |  7 +++++--
2 files changed, 12 insertions(+), 6 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Document a few caveats in synchronous logical replication.
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: Make archiver process an auxiliary process.