Re: hstore_plpython regression test does not work on Python 3

From: Oskari Saarenmaa <os(at)ohmu(dot)fi>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Christian Ullrich <chris(at)chrullrich(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: hstore_plpython regression test does not work on Python 3
Date: 2015-05-29 05:40:46
Message-ID: 5567FBDE.7040704@ohmu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

29.05.2015, 03:12, Peter Eisentraut kirjoitti:
> 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?

Looks good to me.

/ Oskari

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2015-05-29 05:44:58 Re: RFC: Remove contrib entirely
Previous Message Tom Lane 2015-05-29 03:55:53 Re: fsync-pgdata-on-recovery tries to write to more files than previously