Re: [Cython] __dealloc__ called even if __cinit__ failed

2015-10-05 Thread Greg Ewing
Jeroen Demeyer wrote: The problem is that __cinit__ is supposed to set up the C-level attributes for that object. If this somehow fails, then the object isn't in a consistent state yet, so it makes no sense to call __dealloc__ on it. Do you consider this a Cython bug or should I manually prote

Re: [Cython] Python 3 wheels including bytecode files.

2015-10-05 Thread Lisandro Dalcin
On 3 October 2015 at 15:30, Stefan Behnel wrote: > Let's try it in master first. > > https://github.com/cython/cython/commit/bc88b4ae02510d68014839769a1ed47faa7af077 Stefan, I'm starting to fix issues here and there. I have no idea how to fix some tests, in such cases I'm just dissabling them at

Re: [Cython] __dealloc__ called even if __cinit__ failed

2015-10-05 Thread Robert Bradshaw
If cinit fails half way through you still may need to do some cleanup, hence dealloc which must be aware of this. On Oct 5, 2015 7:12 AM, "Jeroen Demeyer" wrote: > Hello, > > I'm not entirely sure if this is a feature or bug... > > I noticed that, if a __cinit__ call raises an exception on an obj

[Cython] __dealloc__ called even if __cinit__ failed

2015-10-05 Thread Jeroen Demeyer
Hello, I'm not entirely sure if this is a feature or bug... I noticed that, if a __cinit__ call raises an exception on an object, that __dealloc__ on that same object is still called. The problem is that __cinit__ is supposed to set up the C-level attributes for that object. If this somehow