[PEAK] DeprecationWarning under python 2.6

Kyle VanderBeek kylev at kylev.com
Thu Jul 23 20:46:21 EDT 2009


On Tue, Jul 14, 2009 at 9:32 PM, P.J. Eby <pje at telecommunity.com> wrote:

> 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.
>

Yup.  After thinking about it further, I realized you guys were correct to
handle it one-off instead of at the base AddOn level.  Thanks!  I've added
your change to the Fedora RPM packaged version so all our users will
benefit.

-- 
kylev at kylev.com
 Some people have a way with words, while others... erm... thingy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eby-sarna.com/pipermail/peak/attachments/20090723/7994c4b1/attachment.html


More information about the PEAK mailing list