From 37f21ed132d1c5aee88e81fee0a0b7e735673d35 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 8 Jan 2020 21:48:44 +0100 Subject: 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 7b283d0e1d1d79bf1c962d790c94d2a53f3bb38a, 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 Discussion: https://www.postgresql.org/message-id/flat/98b69261-298c-13d2-f34d-836fd9c29b21%402ndquadrant.com --- doc/src/sgml/installation.sgml | 2 +- doc/src/sgml/plpython.sgml | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index d4904bf5a06..f1adcc3c559 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -196,7 +196,7 @@ su - postgres language, you need a Python installation with the header files and the distutils module. The minimum - required version is Python 2.4. + required version is Python 2.6. Python 3 is supported if it's version 3.1 or later; but see diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index c4210925718..7bdaf76bbad 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1335,9 +1335,8 @@ $$ LANGUAGE plpythonu; Context managers syntax using the with 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 __enter__ and __exit__ functions using the enter and exit convenience @@ -1367,17 +1366,6 @@ plpy.execute(plan, [result]) $$ LANGUAGE plpythonu; - - - - Although context managers were implemented in Python 2.5, to use - the with syntax in that version you need to - use a future - statement. Because of implementation details, however, - you cannot use future statements in PL/Python functions. - - -- cgit v1.2.3