pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix subtransaction test for Python 3.10
Date: Sat, 05 Jun 2021 05:26:23 +0000
Message-ID: <E1lpOpD-0006H8-DF@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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4a682d85a1408e48ac529295c329ba2c17a44724

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



view thread (6+ messages)  latest in thread

Message-ID: <E1lpOpD-0006H8-DF@gemulon.postgresql.org>
Permalink:  ../E1lpOpD-0006H8-DF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lpOpD-0006H8-DF@gemulon.postgresql.org

 · 

reply

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: <E1lpOpD-0006H8-DF@gemulon.postgresql.org>
  References: <E1lpOpD-0006H8-DF@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