Bugs item #3016673, was opened at 2010-06-15 15:17
Message generated for change (Tracker Item Submitted) made by gendrop
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=3016673&group_id=4866

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: WebKit
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Patrick Gendron (gendrop)
Assigned to: Nobody/Anonymous (nobody)
Summary: Class cache fails using servlet inheritance

Initial Comment:
The following code will fail:

Root.py:
from WebKit.Page import Page
class Root (Page):
    def writeHTML (self):
        Page.writeHTML (self)

A.py:
from Root import Root
class A (Root):
    def writeHTML (self):
        #assert (isinstance(self,Root))
        Root.writeHTML (self)

B.py:
from A import A
class B (A):
    def writeHTML (self):
        A.writeHTML (self)

when successively calling servlets B -> Root -> A -> B after a fresh AppServer 
restart:

TypeError: unbound method writeHTML() must be called with Root instance as 
first argument (got B instance instead)

This seems to be caused by parents of B not being inserted into the cache on 
the first call to this servlet.  Inspection of objects reveal that servlet A 
exists under two different ids during these calls.  Indeed, on the second call 
to B, isinstance(self, Root) returns False in the writeHTML of class A.

Turning off the class cache bypasses this problem.

Can the cache mechanism be fixed to account for this particular situation?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=3016673&group_id=4866

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to