Re: Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-24 Thread Martin v. Löwis
> I have no plans to track down the exact change in Python code that > caused this. There does not seem to be much point, since according to > Fredrik this seems to be an area that is practically undefined and the > M2Crypto code was clearly buggy. I see, and I agree with Fredrik's analysis. It mi

Re: Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-23 Thread Heikki Toivonen
Martin v. Löwis wrote: > Heikki Toivonen wrote: >> I tracked this down to the C code incorrectly returning Py_None when it >> should have returned NULL. Changing the C code to return NULL made it >> behave correctly in 2.6. > > Can you please be specific what function you are talking about? Perha

Re: Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-23 Thread Martin v. Löwis
Heikki Toivonen wrote: > I was debugging M2Crypto function written in C which changed behavior > between Python 2.6 and earlier Python versions. In an error condition > the function was supposed to raise exception type A, but with 2.6 it > raised type B, and further, there was no string value for t

Re: Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-23 Thread Fredrik Lundh
Heikki Toivonen wrote: I was debugging M2Crypto function written in C which changed behavior between Python 2.6 and earlier Python versions. In an error condition the function was supposed to raise exception type A, but with 2.6 it raised type B, and further, there was no string value for the ex

Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-23 Thread Heikki Toivonen
I was debugging M2Crypto function written in C which changed behavior between Python 2.6 and earlier Python versions. In an error condition the function was supposed to raise exception type A, but with 2.6 it raised type B, and further, there was no string value for the exception. I tracked this d