Python 3 compatibility fun

Поиск
Список
Период
Сортировка
Искать

Python 3 compatibility fun

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
According to
https://bugzilla.redhat.com/show_bug.cgi?id=1280404

we're failing to build against Python 3.5 because the python guys
have randomly changed some error message texts, again.

In the short run the answer must be to add some more variant
expected-files, but I wonder if we should be looking for another way.

One question worth asking is whether these specific test cases are
worth having at all ... they don't look all that useful to me.
		regards, tom lane


*** /builddir/build/BUILD/postgresql-9.4.5/src/pl/plpython/expected/python3/plpython_error.out	Wed Nov 11 14:44:44 2015
--- /builddir/build/BUILD/postgresql-9.4.5/src/pl/plpython/results/python3/plpython_error.out	Wed Nov 11 14:44:51 2015
***************
*** 245,251 **** plpy.nonexistent $$ LANGUAGE plpython3u; SELECT toplevel_attribute_error();
! ERROR:  AttributeError: 'module' object has no attribute 'nonexistent' CONTEXT:  Traceback (most recent call last):   PL/Python function "toplevel_attribute_error", line 2, in      plpy.nonexistent
--- 245,251 ---- plpy.nonexistent $$ LANGUAGE plpython3u; SELECT toplevel_attribute_error();
! ERROR:  AttributeError: module 'plpy' has no attribute 'nonexistent' CONTEXT:  Traceback (most recent call last):   PL/Python function "toplevel_attribute_error", line 2, in      plpy.nonexistent
======================================================================
*** /builddir/build/BUILD/postgresql-9.4.5/src/pl/plpython/expected/python3/plpython_subtransaction.out	Wed Nov 11 14:44:44 2015
--- /builddir/build/BUILD/postgresql-9.4.5/src/pl/plpython/results/python3/plpython_subtransaction.out	Wed Nov 11 14:44:51 2015
***************
*** 58,64 ****  TRUNCATE subtransaction_tbl; SELECT subtransaction_test('Python');
! ERROR:  AttributeError: 'module' object has no attribute 'attribute_error' CONTEXT:  Traceback (most recent call last):   PL/Python function "subtransaction_test", line 13, in      plpy.attribute_error
--- 58,64 ----  TRUNCATE subtransaction_tbl; SELECT subtransaction_test('Python');
! ERROR:  AttributeError: module 'plpy' has no attribute 'attribute_error' CONTEXT:  Traceback (most recent call last):   PL/Python function "subtransaction_test", line 13, in      plpy.attribute_error
***************
*** 110,116 ****  TRUNCATE subtransaction_tbl; SELECT subtransaction_ctx_test('Python');
! ERROR:  AttributeError: 'module' object has no attribute 'attribute_error' CONTEXT:  Traceback (most recent call last):   PL/Python function "subtransaction_ctx_test", line 8, in      plpy.attribute_error
--- 110,116 ----  TRUNCATE subtransaction_tbl; SELECT subtransaction_ctx_test('Python');
! ERROR:  AttributeError: module 'plpy' has no attribute 'attribute_error' CONTEXT:  Traceback (most recent call last):   PL/Python function "subtransaction_ctx_test", line 8, in      plpy.attribute_error
======================================================================


Re: Python 3 compatibility fun

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On 11/11/15 12:08 PM, Tom Lane wrote:
> we're failing to build against Python 3.5 because the python guys
> have randomly changed some error message texts, again.

This has already been fixed in the 9.5.


Re: Python 3 compatibility fun

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> On 11/11/15 12:08 PM, Tom Lane wrote:
>> we're failing to build against Python 3.5 because the python guys
>> have randomly changed some error message texts, again.

> This has already been fixed in the 9.5.

Well, that's nice, but surely it should have been back-patched into
every branch that claims to support Python 3.x.  We cannot pretend
that the world is not a moving target.
		regards, tom lane


Re: Python 3 compatibility fun

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On 11/11/15 1:49 PM, Tom Lane wrote:
> Peter Eisentraut  writes:
>> On 11/11/15 12:08 PM, Tom Lane wrote:
>>> we're failing to build against Python 3.5 because the python guys
>>> have randomly changed some error message texts, again.
> 
>> This has already been fixed in the 9.5.
> 
> Well, that's nice, but surely it should have been back-patched into
> every branch that claims to support Python 3.x.  We cannot pretend
> that the world is not a moving target.

I have backpatched this to 9.4, 9.3, 9.2 now.  9.1 doesn't pass with 3.4
either.


FAQ