[Zope3-checkins] CVS: Zope3/src/zope/app/services - interface.py:1.13 view.py:1.32

Sidnei da Silva sidnei at x3ng.com.br
Fri Aug 8 17:47:53 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv2863

Modified Files:
	interface.py view.py 
Log Message:
Remove proxies so we dont get Unpickeable errors. XXX Someone which understands better whats going on should check this. Currently the interface comes out of the interface widget wrapped on a security proxy.

=== Zope3/src/zope/app/services/interface.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/services/interface.py:1.12	Wed Aug  6 17:16:41 2003
+++ Zope3/src/zope/app/services/interface.py	Fri Aug  8 16:47:47 2003
@@ -22,7 +22,8 @@
 from persistence import Persistent
 from zodb.code.patch import registerWrapper, Wrapper
 from zope.interface.interface import InterfaceClass
-
+from zope.interface.interfaces import IInterface
+from zope.interface import Interface
 from zope.component import getService
 from zope.app.component.nextservice import getNextService
 from zope.app.interfaces.services.service import ISimpleService
@@ -31,7 +32,6 @@
 from zope.app.services.servicenames import Interfaces, Utilities
 from zope.component import ComponentLookupError
 from zope.interface import implements
-from zope.interface.interfaces import IInterface
 from zope.app.interfaces.services.registration import IRegistrationStack
 
 class PersistentInterfaceClass(Persistent, InterfaceClass):
@@ -40,7 +40,8 @@
 # PersistentInterface is equivalent to the zope.interface.Interface object
 # except that it is also persistent.  It is used in conjunction with
 # zodb.code to support interfaces in persistent modules.
-PersistentInterface = PersistentInterfaceClass("PersistentInterface")
+PersistentInterface = PersistentInterfaceClass("PersistentInterface",
+                                               (Interface, ))
 
 class PersistentInterfaceWrapper(Wrapper):
 


=== Zope3/src/zope/app/services/view.py 1.31 => 1.32 ===
--- Zope3/src/zope/app/services/view.py:1.31	Thu Aug  7 18:36:53 2003
+++ Zope3/src/zope/app/services/view.py	Fri Aug  8 16:47:47 2003
@@ -323,6 +323,10 @@
                  class_=None, template=None, attribute=None,
                  layer='default'):
 
+        # XXX A Interface comes out of the interface widget
+        # wrapped on a proxy currently, which is not pickable
+        forInterface = removeAllProxies(forInterface)
+
         super(PageRegistration, self).__init__(
             forInterface, viewName, self.presentationType,
             class_, permission, layer)




More information about the Zope3-Checkins mailing list