[Zope-Checkins] CVS: Packages/Zope/App - startup.py:

Tres Seaver tseaver at palladion.com
Sat May 28 20:42:19 EDT 2005

Update of /cvs-repository/Packages/Zope/App
In directory cvs.zope.org:/tmp/cvs-serv32028/lib/python/Zope/App

Modified Files:
      Tag: tseaver-hasattr_geddon-branch
Log Message:

  - Removed all uses of the 'hasattr' builtin from the core, where
    the object being tested derives (or might) from Persistent.
    XXX:  currently, this branch imports a 'safe_hasattr' from ZODB.utils,
    which adds a dependency on ZODB for some packages;  we probably
    need a better location, and perhas a C implementation?

=== Packages/Zope/App/startup.py => ===
--- Packages/Zope/App/startup.py:	Sun May 23 01:53:44 2004
+++ Packages/Zope/App/startup.py	Sat May 28 20:41:38 2005
@@ -22,6 +22,7 @@
 from zExceptions import Unauthorized
 from zLOG import LOG, WARNING, INFO, BLATHER, log_time
 from ZODB.POSException import ConflictError
+from ZODB.utils import safe_hasattr
 import AccessControl.User
 import App.FindHomes
 import ExtensionClass
@@ -228,7 +229,7 @@
     def recordMetaData(self, object, request,
                        # Optimize global var lookups:
-                       hasattr=hasattr, getattr=getattr,
+                       hasattr=safe_hasattr, getattr=getattr,
                        LOG=LOG, WARNING=WARNING,

More information about the Zope-Checkins mailing list