[PEAK] DeprecationWarning under python 2.6

Sergey Schetinin maluke at gmail.com
Tue Jul 14 19:47:04 EDT 2009

On 2009-07-15, Kyle VanderBeek <kylev at kylev.com> wrote:
> It seems silly to me to create duplicate code in PEAK-Rules when we can fix
> it in one place for any/all subclasses of AddOn.  When you say "most", it is
> implied that there may be someone out there who has an AddOn that also
> redefines __new__ (just as BitmapIndex does).  This fix should work for all
> of those classes.

Even though it has nothing to do with AddOn? Try this to get the same warning:

class BitmapIndex(object):
    def __new__(cls, *args):
        return super(BitmapIndex, cls).__new__(cls, *args)

    def __init__(self, *args):


> Actually, I just noticed that peak.util.addons.Registry is a descendant of
> AddOn that redefines __new__ as well, and uses super().  It'll have similar
> problems if we don't fix it down at the AddOn level as I've proposed.

It will not, as it doesn't pass any arguments to super().__new__

More information about the PEAK mailing list