Hello,
attached there is a patch to implement PySequence_SetItem, which
*doesn't* steal a reference as the PyList/PyTuple variants do, and
returns 0 on success, -1 on error.
After cleaning many genuine errors in psycopg, mostly about unchecked
return values, I'm left with several false positives related exactly
to this type of functions, returning 0 on success, -1 on failure and
setting an exception. Each of these functions caller is reported as
"returning (PyObject*)NULL without setting an exception".
Is there any way to flag the behaviour of these functions? An
__attribute__? I'm trying implementing it but time is out for tonight.
I've find how to register the attribute callback but haven't found yet
where and how to use it.
-- Daniele