Re: hstore_plpython regression test does not work on Python 3

Поиск
Список
Период
Сортировка
От Christian Ullrich
Тема Re: hstore_plpython regression test does not work on Python 3
Дата
Msg-id mjmj8h$dee$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: hstore_plpython regression test does not work on Python 3  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: hstore_plpython regression test does not work on Python 3  (Oskari Saarenmaa <os@ohmu.fi>)
Список pgsql-hackers
* Peter Eisentraut wrote:

> On 5/16/15 12:06 PM, Tom Lane wrote:
>> As exhibited for instance here:
>>
>> http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=spoonbill&dt=2015-05-16%2011%3A00%3A07
>>
>> I've been able to replicate this on a Fedora 21 box: works fine with
>> Python 2, fails with Python 3.  Seems like we still have an issue
>> with reliance on a system-provided sort method.
>
> Pushed a fix, tested with 2.3 .. 3.4.

There is still a sorting problem (of sorts). jaguarundi [1] keeps 
failing intermittently like this:

*** 47,53 ****  return len(val)  $$;  SELECT test1arr(array['aa=>bb, cc=>NULL'::hstore, 'dd=>ee']);
! INFO:  [{'aa': 'bb', 'cc': None}, {'dd': 'ee'}]  CONTEXT:  PL/Python function "test1arr"   test1arr  ----------
--- 47,53 ----  return len(val)  $$;  SELECT test1arr(array['aa=>bb, cc=>NULL'::hstore, 'dd=>ee']);
! INFO:  [{'cc': None, 'aa': 'bb'}, {'dd': 'ee'}]  CONTEXT:  PL/Python function "test1arr"   test1arr  ----------

I cannot find any other animal that does the same, but I doubt it's due 
to CCA this time.

Should dict tests perhaps output sorted(thedict.items()) instead? 
Testing dict formatting could be done with single-item dicts.

[1] http://pgbuildfarm.org/cgi-bin/show_history.pl?nm=jaguarundi&br=HEAD

-- 
Christian





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: [GENERAL] Strange replication problem - segment restored from archive but still requested from master
Следующее
От: "Shulgin, Oleksandr"
Дата:
Сообщение: Re: [PATCH] Generalized JSON output functions