Re: remove support for old Python versions
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-12-13T12:23:13Z
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
Commits
-
Modernize Python exception syntax in tests
- 45223fd9cefe 13.0 landed
-
Remove support for Python older than 2.6
- 37f21ed132d1 13.0 landed