From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix subtransaction test for Python 3.10
Date: Thu, 17 Jun 2021 07:05:07 +0000
Message-ID: <E1ltm5L-0006yU-Rq@gemulon.postgresql.org> (raw)
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_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6b6fbfd7e299e96c3910650b0e192ca05fb590a6
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(-)
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: Fix subtransaction test for Python 3.10
In-Reply-To: <E1ltm5L-0006yU-Rq@gemulon.postgresql.org>
References: <E1ltm5L-0006yU-Rq@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