Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-12 Thread Peter Eisentraut
On fre, 2012-05-11 at 11:28 +0200, Jan Urbański wrote: > On 10/05/12 19:45, Peter Eisentraut wrote: > > On lör, 2012-05-05 at 22:45 +0200, Jan Urbański wrote: > >> Apparently once you implement PyMappingMethods.mp_subscript you can > >> drop PySequenceMethods.sq_slice, but I guess there's no harm i

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-11 Thread Jan Urbański
On 10/05/12 19:45, Peter Eisentraut wrote: On lör, 2012-05-05 at 22:45 +0200, Jan Urbański wrote: Apparently once you implement PyMappingMethods.mp_subscript you can drop PySequenceMethods.sq_slice, but I guess there's no harm in keeping it (and I'm not sure it'd work on Python 2.3 with only mp_

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-10 Thread Peter Eisentraut
On lör, 2012-05-05 at 22:45 +0200, Jan Urbański wrote: > Apparently once you implement PyMappingMethods.mp_subscript you can > drop PySequenceMethods.sq_slice, but I guess there's no harm in > keeping it (and I'm not sure it'd work on Python 2.3 with only > mp_subscript implemented). Committed thi

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-10 Thread Peter Eisentraut
On tor, 2012-05-10 at 12:37 -0400, Robert Haas wrote: > On Sat, May 5, 2012 at 4:45 PM, Jan Urbański wrote: > >> I found some instructions on how to deal with the Python 2/Python 3 > >> slicing mess: > >> > >> > >> http://renesd.blogspot.com/2009/07/python3-c-api-simple-slicing-sqslice.html > > >

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-10 Thread Robert Haas
On Sat, May 5, 2012 at 4:45 PM, Jan Urbański wrote: >> I found some instructions on how to deal with the Python 2/Python 3 >> slicing mess: >> >> >> http://renesd.blogspot.com/2009/07/python3-c-api-simple-slicing-sqslice.html > > > Thanks to the helpful folk at #python I found out that the fix is

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-05 Thread Jan Urbański
On 04/05/12 20:00, Jan Urbański wrote: On 03/05/12 11:04, Jan Urbański wrote: On 02/05/12 20:18, Peter Eisentraut wrote: This doesn't work anymore with Python 3: rv = plpy.execute(...) do_something(rv[0:1]) Sounds ugly. I'll take a look. I found some instructions on how to deal with the Py

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-04 Thread Jan Urbański
On 03/05/12 11:04, Jan Urbański wrote: On 02/05/12 20:18, Peter Eisentraut wrote: This doesn't work anymore with Python 3: rv = plpy.execute(...) do_something(rv[0:1]) Apparently, they changed the C API for doing slicing, or rather made one of the two APIs for it silently do nothing. Details a

Re: [HACKERS] PL/Python result set slicing broken in Python 3

2012-05-03 Thread Jan Urbański
On 02/05/12 20:18, Peter Eisentraut wrote: This doesn't work anymore with Python 3: rv = plpy.execute(...) do_something(rv[0:1]) Apparently, they changed the C API for doing slicing, or rather made one of the two APIs for it silently do nothing. Details are difficult to find, but this email me

[HACKERS] PL/Python result set slicing broken in Python 3

2012-05-02 Thread Peter Eisentraut
This doesn't work anymore with Python 3: rv = plpy.execute(...) do_something(rv[0:1]) Apparently, they changed the C API for doing slicing, or rather made one of the two APIs for it silently do nothing. Details are difficult to find, but this email message seems to contain something: