[Zope-Checkins] SVN: Zope/branches/2.13/src/ revert changes

Nikolay Kim fafhrd91 at gmail.com
Mon Aug 1 14:14:10 EDT 2011


Log message for revision 122436:
  revert changes

Changed:
  U   Zope/branches/2.13/src/OFS/ObjectManager.py
  U   Zope/branches/2.13/src/Products/PageTemplates/Expressions.py
  U   Zope/branches/2.13/src/ZPublisher/HTTPRequest.py

-=-
Modified: Zope/branches/2.13/src/OFS/ObjectManager.py
===================================================================
--- Zope/branches/2.13/src/OFS/ObjectManager.py	2011-08-01 12:41:24 UTC (rev 122435)
+++ Zope/branches/2.13/src/OFS/ObjectManager.py	2011-08-01 18:14:09 UTC (rev 122436)
@@ -425,7 +425,7 @@
         # Returns a list of actual subobjects of the current object.
         # If 'spec' is specified, returns only objects whose meta_type
         # match 'spec'.
-        return [ getattr(self, id) for id in self.objectIds(spec) ]
+        return [ self._getOb(id) for id in self.objectIds(spec) ]
 
     security.declareProtected(access_contents_information, 'objectItems')
     def objectItems(self, spec=None):
@@ -763,7 +763,7 @@
         return self.manage_delObjects(ids=[name])
 
     def __getitem__(self, key):
-        v=getattr(self, key, None)
+        v=self._getOb(key, None)
         if v is not None: return v
         if hasattr(self, 'REQUEST'):
             request=self.REQUEST

Modified: Zope/branches/2.13/src/Products/PageTemplates/Expressions.py
===================================================================
--- Zope/branches/2.13/src/Products/PageTemplates/Expressions.py	2011-08-01 12:41:24 UTC (rev 122435)
+++ Zope/branches/2.13/src/Products/PageTemplates/Expressions.py	2011-08-01 18:14:09 UTC (rev 122436)
@@ -71,7 +71,7 @@
     while path_items:
         name = path_items.pop()
         if OFS.interfaces.ITraversable.providedBy(object):
-            object = object.unrestrictedTraverse(name, restricted=True)
+            object = object.restrictedTraverse(name)
         else:
             object = traversePathElement(object, name, path_items,
                                          request=request)

Modified: Zope/branches/2.13/src/ZPublisher/HTTPRequest.py
===================================================================
--- Zope/branches/2.13/src/ZPublisher/HTTPRequest.py	2011-08-01 12:41:24 UTC (rev 122435)
+++ Zope/branches/2.13/src/ZPublisher/HTTPRequest.py	2011-08-01 18:14:09 UTC (rev 122436)
@@ -169,9 +169,6 @@
 
     retry_max_count = 3
 
-    def __conform__(self, iface):
-        return iface.__adapt__(self)
-
     def supports_retry(self):
         if self.retry_count < self.retry_max_count:
             time.sleep(random.uniform(0, 2 ** (self.retry_count)))
@@ -257,11 +254,11 @@
 
     def physicalPathToURL(self, path, relative=0):
         """ Convert a physical path into a URL in the current context """
-        path = self._script + [quote(s) for s in self.physicalPathToVirtualPath(path)]
+        path = self._script + map(quote, self.physicalPathToVirtualPath(path))
         if relative:
             path.insert(0, '')
         else:
-            path.insert(0, self.other['SERVER_URL'])
+            path.insert(0, self['SERVER_URL'])
         return '/'.join(path)
 
     def physicalPathFromURL(self, URL):
@@ -453,9 +450,6 @@
         self.cookies = cookies
         self.taintedcookies = taintedcookies
 
-    def __nonzero__(self):
-        return True
-
     def processInputs(
         self,
         # "static" variables that we want to be local for speed
@@ -1296,7 +1290,7 @@
                 if n:
                     n = n - 1
                     if len(path) < n:
-                        return default
+                        raise KeyError, key
 
                     v = self._script + path[:n]
                 else:



More information about the Zope-Checkins mailing list