[PEAK] DeprecationWarning under python 2.6

P.J. Eby pje at telecommunity.com
Wed Jul 15 00:32:29 EDT 2009

At 02:47 AM 7/15/2009 +0300, Sergey Schetinin wrote:
> > 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__

Which illustrates how this can be fixed, actually.  The simple way is 
to change BitmapIndex not to pass through its other __new__() 
arguments; it really doesn't need to.

I would recommend this as the way to fix this problem, as it doesn't 
incur any performance overhead; in fact, it should improve 
performance.  It does require changing any class that has the 
problem, but there shouldn't be very many that suffer from it.

I just went ahead and checked in a fix to PEAK-Rules for this, since 
it's clearly the correct solution in this case.

It's possible there are other projects of mine requiring similar 
fixes (likely Trellis and Contextual), but they can be fixed on a 
one-off basis.  I'm not 100% certain as yet that changing AddOns is 
the right/safe thing to do, so this is what I'm going to recommend for now.

More information about the PEAK mailing list