remove support for old Python versions

‹ Previous Topic Next Topic ›
 
♦
♦
8 messages Options
Reply | Threaded
Open this post in threaded view
♦
♦
|

remove support for old Python versions

Per discussion in [0], here is a patch set to remove support for Python
versions older than 2.6.


[0]:
https://www.postgresql.org/message-id/6d3b7b69-0970-4d40-671a-268c46e93fe3@...

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

0001-Remove-support-for-Python-older-than-2.6.patch (80K) Download Attachment
0002-Modernize-Python-exception-syntax.patch (21K) Download Attachment
Tom Lane-2
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

Tom Lane-2
Peter Eisentraut < > writes:
> Per discussion in [0], here is a patch set to remove support for Python
> versions older than 2.6.

I took a brief look through this and it seems reasonable.  Two
minor comments:

* In the docs section beginning "Context managers syntax using the with
keyword", could we drop that entire ?  It seems like it's now not
saying much more than "you can use this standard python feature", which
is hardly surprising information.

* 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?

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions


> * In the docs section beginning "Context managers syntax using the with
> keyword", could we drop that entire ?  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


Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

In reply to this post by Peter Eisentraut-6

> Per discussion in [0], here is a patch set to remove support for Python
> versions older than 2.6.
>
>
> [0]:
> https://www.postgresql.org/message-id/6d3b7b69-0970-4d40-671a-268c46e93fe3@...

It appears that the removal of old OpenSSL support is stalled or
abandoned for now, so this patch set is on hold for now as well, as far
as I'm concerned.  I have committed the change of the Python exception
syntax in the documentation, though.

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


Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

On Tue, Dec 31, 2019 at 10:46:55AM +0100, Peter Eisentraut wrote:
> It appears that the removal of old OpenSSL support is stalled or abandoned
> for now, so this patch set is on hold for now as well, as far as I'm
> concerned.  I have committed the change of the Python exception syntax in
> the documentation, though.

Yeah, the cleanup of the code related to OpenSSL 0.9.8 and 1.0.0 was
rather limited, which was disappointing, so I am still hesitating in
merging that into the tree.  Doing more cleanup with the past Python
versions gives a good extra argument though, so I'll send a notice on
the OpenSSL thread here:
https://www.postgresql.org/message-id/20191205083252.GE5064@...
--
Michael

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

In reply to this post by Peter Eisentraut-6


>> Per discussion in [0], here is a patch set to remove support for Python
>> versions older than 2.6.
>>
>>
>> [0]:
>> https://www.postgresql.org/message-id/6d3b7b69-0970-4d40-671a-268c46e93fe3@...
>
> It appears that the removal of old OpenSSL support is stalled or
> abandoned for now, so this patch set is on hold for now as well, as far
> as I'm concerned.  I have committed the change of the Python exception
> syntax in the documentation, though.

Since the OpenSSL patch went ahead, I have now committed this one as well.

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


Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

On Wed, Jan 08, 2020 at 11:04:48PM +0100, Peter Eisentraut wrote:
> Since the OpenSSL patch went ahead, I have now committed this one as well.

Yippee.
--
Michael

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
♦
♦
|

Re: remove support for old Python versions

In reply to this post by Peter Eisentraut-6
Rémi,

please update your build farm member "locust" to a new Python version
(>=2.6) for the master branch, or disable the Python option.

Thanks.

On 2020-01-08 23:04, Peter Eisentraut wrote:



>>> Per discussion in [0], here is a patch set to remove support for Python
>>> versions older than 2.6.
>>>
>>>
>>> [0]:
>>> https://www.postgresql.org/message-id/6d3b7b69-0970-4d40-671a-268c46e93fe3@...
>>
>> It appears that the removal of old OpenSSL support is stalled or
>> abandoned for now, so this patch set is on hold for now as well, as far
>> as I'm concerned.  I have committed the change of the Python exception
>> syntax in the documentation, though.
>
> Since the OpenSSL patch went ahead, I have now committed this one as well.

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