Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2l8p-0002n1-Mg for pgsql-committers@arkaria.postgresql.org; Sun, 01 Apr 2018 22:07:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f2l8o-0002Q3-6U for pgsql-committers@arkaria.postgresql.org; Sun, 01 Apr 2018 22:07:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2l8o-0002Pu-1H for pgsql-committers@lists.postgresql.org; Sun, 01 Apr 2018 22:07:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2l8k-0005Nq-SQ for pgsql-committers@lists.postgresql.org; Sun, 01 Apr 2018 22:07:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w31M7p8f017961; Sun, 1 Apr 2018 18:07:51 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Transforms for jsonb to PL/Python In-reply-to: <6087.1522473328@sss.pgh.pa.us> References: <20d9fdcc-eaec-647a-bf27-e7cc5861547f@2ndquadrant.com> <6087.1522473328@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 31 Mar 2018 01:15:28 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17959.1522620471.1@sss.pgh.pa.us> Date: Sun, 01 Apr 2018 18:07:51 -0400 Message-ID: <17960.1522620471@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > gaur (python 2.5) is showing a different output pathology: A bit of google research indicates that Python did not have reliable handling of infinity or NaN floats until 2.6; before that, you could get failures or platform-specific results from code like float('inf'). So this test ain't gonna work as-is on old versions. I see a few options: 1. Just remove the tests involving inf/nan. As far as I can see, there's no explicit handling of these cases in jsonb_plpython, so we're not really buying any test coverage of our own code anyway. 2. Maintain additional expected-output files. One problem with this is it's not clear how many we'd need. 3. Somehow tweak the test cases in a different way, so that they're not exercised before 2.6. 4. Move our minimum supported Python version up to 2.6 (from 2.4 where it is now). #4 seems like an overreaction at first sight, but on the other hand, I wonder how many people really care about pre-2.6 anymore anyway. (2.4 was released Nov. 2004, 2.6 Oct 2008.) AFAIR, the only reason I'm running 2.5 on gaur/pademelon is we claim to support it. regards, tom lane