Re: remove support for old Python versions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: remove support for old Python versions
Date
Msg-id 99f09d79-8ba9-7443-dca7-3d6d691eff2f@2ndquadrant.com
Whole thread Raw
In response to Re: remove support for old Python versions  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Re[2]: Async_Notify
Next
From: Peter Eisentraut
Date:
Subject: Re: more backtraces