Re: remove support for old Python versions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: remove support for old Python versions
Date: 2019-12-13 12:23:13
Message-ID: 99f09d79-8ba9-7443-dca7-3d6d691eff2f@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-12-09 23:32, Tom Lane wrote:
> * In the docs section beginning "Context managers syntax using the with
> keyword", could we drop that entire <sect2>? It seems like it's now not
> saying much more than "you can use this standard python feature", which
> is hardly surprising information.

That section points out the existence of the subxact.enter() and
subxact.exit() methods. New code wouldn't need to use those, but
someone might find them in old code, so it would be good to have them at
least mentioned somewhere. Maybe it could be rewritten, but I hesitate
to remove it completely.

> * I'm not sure it's a good idea to remove the test case you removed
> from plpython_subtransaction.sql. We still need to support user
> code written that way, don't we?

The main purpose of that test case was that older Python versions can
test this functionality at all, because most of the rest of the file
would fail with Python syntax errors around the "with" keyword. With
newer Python versions there is IMO no need to test both the "with"
variant and the equivalent __enter__+__exit__ variant separately,
because that would just show that Python itself works correctly. Then
again, we could keep it for completeness and clarity.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-13 12:26:43 Re: more backtraces
Previous Message Pavel Stehule 2019-12-13 12:16:49 Re: Re[2]: Async_Notify