pgsql: PL/Python: Fix slicing support for result objects for Python 3

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: PL/Python: Fix slicing support for result objects for Python 3
Дата
Msg-id E1SSXMu-0004j6-IT@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
PL/Python: Fix slicing support for result objects for Python 3

The old way of implementing slicing support by implementing
PySequenceMethods.sq_slice no longer works in Python 3.  You now have
to implement PyMappingMethods.mp_subscript.  Do this by simply
proxying the call to the wrapped list of result dictionaries.
Consolidate some of the subscripting regression tests.

Jan Urbański

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a97207b6908f1d4a7d19b37b818367bb0171039f

Modified Files
--------------
src/pl/plpython/expected/plpython_spi.out |   75 +++++++++++++++++++++--------
src/pl/plpython/plpy_resultobject.c       |   26 ++++++++++-
src/pl/plpython/sql/plpython_spi.sql      |   51 ++++++++++++++------
3 files changed, 116 insertions(+), 36 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix Windows implementation of PGSemaphoreLock.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: PL/Python: Update incorrect comment