Re: DeprecationWarning under python 2.6
Kyle VanderBeek <[email protected]> Thu, 23 Jul 2009 17:46:21 -0700
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 14, 2009 at 9:32 PM, P.J. Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> 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. -- [email protected] Some people have a way with words, while others... erm... thingy. _______________________________________________ PEAK mailing list [email protected] http://www.eby-sarna.com/mailman/listinfo/peak