[Zodb-checkins] CVS: Zope3/src/zodb/code - function.py:1.6.36.1 module.py:1.18.4.2

Jim Fulton jim at zope.com
Fri Jan 16 10:44:08 EST 2004


Update of /cvs-repository/Zope3/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv19071/src/zodb/code

Modified Files:
      Tag: zope3-zodb3-devel-branch
	function.py module.py 
Log Message:
Various changes to get tests passing.


=== Zope3/src/zodb/code/function.py 1.6 => 1.6.36.1 ===
--- Zope3/src/zodb/code/function.py:1.6	Tue May 20 15:07:23 2003
+++ Zope3/src/zodb/code/function.py	Fri Jan 16 10:43:29 2004
@@ -103,10 +103,14 @@
     def __getattr__(self, attr):
         # If it wasn't found in __dict__, then it must be a function
         # attribute.
+        if attr == '_pf_func':
+            raise AttributeError, attr
         return getattr(self._pf_func, attr)
 
     def __setattr__(self, attr, value):
-        if not self._p_setattr(attr, value):
+        if attr[:3].startswith('_p_'):
+            Persistent.__setattr__(self, attr, value)
+        else:
             # the persistence machinery didn't handle this attribute,
             # it must be ours
             if attr.startswith('_pf_'):
@@ -115,6 +119,8 @@
                     self._v_side_effect = has_side_effect(self._pf_func)
             else:
                 setattr(self._pf_func, attr, value)
+            if not attr.startswith('_v_'):
+                self._p_changed = 1
 
     def __delattr__(self, attr):
         if not self._p_delattr(attr):


=== Zope3/src/zodb/code/module.py 1.18.4.1 => 1.18.4.2 ===
--- Zope3/src/zodb/code/module.py:1.18.4.1	Fri Jan  9 17:23:30 2004
+++ Zope3/src/zodb/code/module.py	Fri Jan 16 10:43:29 2004
@@ -292,7 +292,7 @@
         self._modules = {}
 
     def findModule(self, name):
-        assert self._p_state != GHOST
+        assert self._p_changed is not None
         return self._modules.get(name)
 
     def setModule(self, name, module):




More information about the Zodb-checkins mailing list