On Tue, Jul 14, 2009 at 9:32 PM, P.J. Eby <span dir="ltr"><<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">At 02:47 AM 7/15/2009 +0300, Sergey Schetinin wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Actually, I just noticed that peak.util.addons.Registry is a descendant of<br>
> AddOn that redefines __new__ as well, and uses super(). It'll have similar<br>
> problems if we don't fix it down at the AddOn level as I've proposed.<br>
<br>
It will not, as it doesn't pass any arguments to super().__new__<br>
</blockquote>
<br></div>
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.<br>
<br>
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.<br>
<br>
I just went ahead and checked in a fix to PEAK-Rules for this, since it's clearly the correct solution in this case.<br>
<br>
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.<br>
</blockquote></div><br>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.<br clear="all">
<br>-- <br><a href="mailto:kylev@kylev.com">kylev@kylev.com</a><br> Some people have a way with words, while others... erm... thingy.<br><br>