Re: Python 2.7 deprecated the PyCObject API?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Python 2.7 deprecated the PyCObject API?
Дата
Msg-id 2536.1281896703@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Python 2.7 deprecated the PyCObject API?  (James William Pye <lists@jwp.name>)
Список pgsql-hackers
James William Pye <lists@jwp.name> writes:
> On Aug 14, 2010, at 9:08 AM, Tom Lane wrote:
>> Just to clarify, you're recommending something like
>> 
>>        proc->me = PyCObject_FromVoidPtr(proc, NULL);
>> +        if (proc->me == NULL)
>> +            elog(ERROR, "could not create PyCObject for function");
>>        PyDict_SetItemString(PLy_procedure_cache, key, proc->me);
>> 
>> correct?  (Hm, and it looks like we'd better move the pfree just above that...)

> Almost, there's still a Python exception to report and/or clear.

Ah, right, I guess that should be PLy_elog() not just elog().

>> Yeah, and since we'll have to back-patch it, a fairly noninvasive patch
>> would be nice.  Will you work on that?

> I was hoping that Peter would pop in with a patch, but I think a few lines of CPP may suffice..
> ...
> yay? nay?

Damifino, I don't hack Python.  Peter?
        regards, tom lane


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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: WIP: Triggers on VIEWs
Следующее
От: Tom Lane
Дата:
Сообщение: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)