[Cython] tp_alloc() vs. object.__new__() (was: Cython 0.20 beta 2)
robertwb at gmail.com
Sun Jan 12 10:32:47 CET 2014
On Sun, Jan 12, 2014 at 1:21 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Stefan Behnel, 12.01.2014 09:20:
>> The only thing that is still a bit unclear to me is whether calling
>> object.__new__() from extension types was a good idea:
>> It means that we are now running a couple of safety checks inside of
>> CPython on object instantiation that validate the arguments being passed
>> into __init__() and __new__(), because object() doesn't expect any.
>> If we want to play safe for the release, we could restrict this change only
>> to abstract classes for now (for which we know that CPython will generate
>> an error). That was the original intention of the change anyway.
> Proposed patch push to master for testing.
Yeah, that might be a bit safer.
FWIW, I did see that you rolled back the earlier code in this area to
get Sage passing again (and also hooked up Jenkins to the latest
(git-based) release of Sage), and all looked good there.
More information about the cython-devel