Python 3 compatibility fun

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Python 3 compatibility fun
Date: 2015-11-11 17:08:10
Message-ID: 32053.1447261690@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <module>
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 <module>
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 <module>
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 <module>
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 <module>
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 <module>
plpy.attribute_error
======================================================================

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-11-11 17:13:42 Re: Patch to install config/missing
Previous Message Peter Eisentraut 2015-11-11 17:01:27 Re: [COMMITTERS] pgsql: Translation updates