[Zope3-checkins] CVS: Zope3/src/zope/app/utilities - content.py:1.8 instance.py:1.4 schema.py:1.15 wrapper.py:1.3

Fred L. Drake, Jr. fred at zope.com
Fri Feb 20 11:58:06 EST 2004


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

Modified Files:
	content.py instance.py schema.py wrapper.py 
Log Message:


update to replace ZODB 4 with ZODB 3


=== Zope3/src/zope/app/utilities/content.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/utilities/content.py:1.7	Thu Dec 18 04:57:16 2003
+++ Zope3/src/zope/app/utilities/content.py	Fri Feb 20 11:57:32 2004
@@ -17,8 +17,8 @@
 """
 __metaclass__ = type
 
-from persistence import Persistent
-from persistence.dict import PersistentDict
+from persistent import Persistent
+from persistent.dict import PersistentDict
 from zope.app import zapi
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.interfaces.annotation import IAnnotations


=== Zope3/src/zope/app/utilities/instance.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/utilities/instance.py:1.3	Sun Sep 21 13:31:15 2003
+++ Zope3/src/zope/app/utilities/instance.py	Fri Feb 20 11:57:33 2004
@@ -17,8 +17,8 @@
 """
 __metaclass__ = type
 
-from persistence import Persistent
-from persistence.dict import PersistentDict
+from persistent import Persistent
+from persistent.dict import PersistentDict
 from zope.app.component.interfacefield import InterfaceField
 from zope.interface import directlyProvides, implements, Interface
 from zope.schema import getFields, TextLine


=== Zope3/src/zope/app/utilities/schema.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/utilities/schema.py:1.14	Wed Dec 17 16:27:32 2003
+++ Zope3/src/zope/app/utilities/schema.py	Fri Feb 20 11:57:33 2004
@@ -17,8 +17,8 @@
 """
 from types import FunctionType
 
-from persistence import Persistent
-from persistence.dict import PersistentDict
+from persistent import Persistent
+from persistent.dict import PersistentDict
 
 from zope.security.proxy import trustedRemoveSecurityProxy
 from zope.proxy import removeAllProxies


=== Zope3/src/zope/app/utilities/wrapper.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utilities/wrapper.py:1.2	Mon Nov 24 12:37:38 2003
+++ Zope3/src/zope/app/utilities/wrapper.py	Fri Feb 20 11:57:33 2004
@@ -14,7 +14,7 @@
 """Provide persistent wrappers for objects that cannot derive from
 persistence for some reason."""
 
-from persistence import Persistent
+from persistent import Persistent, GHOST
 from zope.interface import implementedBy
 from zope.security.checker import selectChecker
 
@@ -37,7 +37,7 @@
             #
             # Added the same code below, in ClassDescriptor,
             # though I'm not sure it is really needed there.
-            if inst._p_state == 3:
+            if inst._p_state == GHOST:
                 inst._p_activate()
             return selectChecker(inst.__proxied__)
 
@@ -51,7 +51,7 @@
         if inst is None:
             return cls
         else:
-            if inst._p_state == 3:
+            if inst._p_state == GHOST:
                 inst._p_activate()
             return inst.__proxied__.__class__
 
@@ -85,14 +85,14 @@
 
   def __getattribute__(self, name):
       if name.startswith('_p_') or name in struct_attrs:
-          v = object.__getattribute__(self, name)
+          v = Persistent.__getattribute__(self, name)
           # Handle descriptors here, eg: __Security_checker__
           # is a descriptor for Struct objects.
           if hasattr(v, '__get__'):
               return v.__get__(self, type(self))
           return v
       # XXX This is butt ugly. See the comment on SecurityDescriptor.
-      if self._p_state == 3:
+      if self._p_state == GHOST:
           self._p_activate()
       proxied = self.__proxied__
       v = getattr(proxied, name)




More information about the Zope3-Checkins mailing list