1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Remove support for Python older than 2.6

Supporting very old Python versions is a maintenance burden,
especially with the several variant test files to maintain for Python
<2.6.

Since we have dropped support for older OpenSSL versions in
7b283d0e1d, RHEL 5 is now effectively
desupported, and that was also the only mainstream operating system
still using Python versions before 2.6, so it's a good time to drop
those as well.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/98b69261-298c-13d2-f34d-836fd9c29b21%402ndquadrant.com
This commit is contained in:
Peter Eisentraut
2020-01-08 21:48:44 +01:00
parent f5d28710c7
commit 37f21ed132
12 changed files with 7 additions and 1503 deletions

View File

@ -1335,9 +1335,8 @@ $$ LANGUAGE plpythonu;
<para>
Context managers syntax using the <literal>with</literal> keyword
is available by default in Python 2.6. If using PL/Python with an
older Python version, it is still possible to use explicit
subtransactions, although not as transparently. You can call the
is available by default in Python 2.6. For compatibility with
older Python versions, you can call the
subtransaction manager's <literal>__enter__</literal> and
<literal>__exit__</literal> functions using the
<literal>enter</literal> and <literal>exit</literal> convenience
@ -1367,17 +1366,6 @@ plpy.execute(plan, [result])
$$ LANGUAGE plpythonu;
</programlisting>
</para>
<note>
<para>
Although context managers were implemented in Python 2.5, to use
the <literal>with</literal> syntax in that version you need to
use a <ulink
url="https://docs.python.org/release/2.5/ref/future.html">future
statement</ulink>. Because of implementation details, however,
you cannot use future statements in PL/Python functions.
</para>
</note>
</sect2>
</sect1>