[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/__init__.py Added a bit of debugging code, so someone more knowledgeable can have a look ; )

Hanno Schlichting plone at hannosch.info
Thu Aug 2 03:19:32 EDT 2007


Log message for revision 78543:
  Added a bit of debugging code, so someone more knowledgeable can have a look ;)

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/browser/__init__.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/__init__.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/__init__.py	2007-08-02 01:22:24 UTC (rev 78542)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/__init__.py	2007-08-02 07:19:31 UTC (rev 78543)
@@ -23,16 +23,29 @@
     # BBB for code that expects BrowserView to still inherit from
     # Acquisition.Explicit.
 
+    # counter = 0
+
     def __of__(self, context):
         # Technically this isn't in line with the way Acquisition's
         # __of__ works.  With Acquisition, you get a wrapper around
         # the original object and only that wrapper's parent is the
         # new context.  Here we change the original object.
         
-        # The first segfault happens in form.tests.forms.txt in the first line
-        # of the "Widget Overrides" chapter (line 154).
-        #self.__parent__ = context  # ugh. segfault!
+        # XXX The first segfault happens in form.tests.forms.txt in the first
+        # line of the "Widget Overrides" chapter (line 154).
 
+        # What causes it is:
+        
+        # ../zope2/lib/python/Zope2/App/startup.py(199)__call__()
+        # -> log = aq_acquire(published, '__error_log__', containment=1)
+        
+        # Which causes an infinite loop :(
+        
+        # self.__parent__ = context  # ugh. segfault!
+        # self.counter = self.counter + 1
+        # if self.counter > 10:
+        #     import pdb; pdb.set_trace()
+
         return self
 
     # Classes which are still based on Acquisition and access
@@ -56,3 +69,4 @@
 
     def aq_inContextOf(self, *args, **kw):
         return Acquisition.aq_inContextOf(self, *args, **kw)
+



More information about the Zope-Checkins mailing list