Re: hstore_plpython regression test does not work on Python 3 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: hstore_plpython regression test does not work on Python 3
Date
Msg-id 5567AEF9.5000307@gmx.net
Whole thread Raw
In response to Re: hstore_plpython regression test does not work on Python 3  (Oskari Saarenmaa <os@ohmu.fi>)
Responses Re: hstore_plpython regression test does not work on Python 3
Re: hstore_plpython regression test does not work on Python 3
List pgsql-hackers
On 5/26/15 5:19 PM, Oskari Saarenmaa wrote:
>> [1] http://pgbuildfarm.org/cgi-bin/show_history.pl?nm=jaguarundi&br=HEAD
>
> Looks like that animal uses Python 3.4.  Python 3.3 and newer versions
> default to using a random seed for hashing objects into dicts which
> makes the order of dict elements random; see
> https://docs.python.org/3/using/cmdline.html#cmdoption-R

Ah, good catch.  That explains the, well, randomness.  I can reproduce
the test failures with PYTHONHASHSEED=2.

But I haven't been successful getting that environment variable set so
that it works in the installcheck case.  Instead, I have rewritten the
tests to use asserts instead of textual comparisons.  See attached
patch.  Comments?


Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Next
From: Noah Misch
Date:
Subject: Re: RFC: Non-user-resettable SET SESSION AUTHORISATION