Thread

Commits

  1. Modernize Python exception syntax in tests

  2. Remove support for Python older than 2.6

  1. remove support for old Python versions

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2019-12-09T10:37:54Z

    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@2ndquadrant.com
    
    -- 
    Peter Eisentraut              http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
  2. Re: remove support for old Python versions

    Tom Lane <tgl@sss.pgh.pa.us> — 2019-12-09T22:32:48Z

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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 <sect2>?  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
    
    
    
    
  3. Re: remove support for old Python versions

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2019-12-13T12:23:13Z

    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
    
    
    
    
  4. Re: remove support for old Python versions

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2019-12-31T09:46:55Z

    On 2019-12-09 11:37, 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@2ndquadrant.com
    
    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
    
    
    
    
  5. Re: remove support for old Python versions

    Michael Paquier <michael@paquier.xyz> — 2020-01-02T13:47:28Z

    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@paquier.xyz
    --
    Michael
    
  6. Re: remove support for old Python versions

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2020-01-08T22:04:48Z

    On 2019-12-31 10:46, Peter Eisentraut wrote:
    > On 2019-12-09 11:37, 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@2ndquadrant.com
    > 
    > 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
    
    
    
    
  7. Re: remove support for old Python versions

    Michael Paquier <michael@paquier.xyz> — 2020-01-09T03:09:58Z

    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
    
  8. Re: remove support for old Python versions

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2020-01-15T14:15:11Z

    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:
    > On 2019-12-31 10:46, Peter Eisentraut wrote:
    >> On 2019-12-09 11:37, 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@2ndquadrant.com
    >>
    >> 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