[Zope3-checkins] CVS: Zope3/src/zope/app/traversing - __init__.py:1.10 adapters.py:1.3
Albertas Agejevas
alga@codeworks.lt
Wed, 19 Mar 2003 12:56:08 -0500
Update of /cvs-repository/Zope3/src/zope/app/traversing
In directory cvs.zope.org:/tmp/cvs-serv28092/src/zope/app/traversing
Modified Files:
__init__.py adapters.py
Log Message:
Renamed getPhysicalRoot() to getRoot().
=== Zope3/src/zope/app/traversing/__init__.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/traversing/__init__.py:1.9 Wed Feb 26 14:29:02 2003
+++ Zope3/src/zope/app/traversing/__init__.py Wed Mar 19 12:55:37 2003
@@ -22,7 +22,7 @@
__all__ = ['traverse', 'traverseName', 'objectName', 'getParent',
'getParents', 'getPhysicalPath', 'getPhysicalPathString',
- 'getPhysicalRoot', 'locationAsTuple', 'locationAsUnicode']
+ 'getRoot', 'locationAsTuple', 'locationAsUnicode']
_marker = object()
@@ -37,10 +37,10 @@
path = getAdapter(obj, IPhysicallyLocatable).getPhysicalPath()
return locationAsUnicode(path)
-def getPhysicalRoot(obj):
+def getRoot(obj):
"""Returns the root of the traversal for the given object.
"""
- return getAdapter(obj, IPhysicallyLocatable).getPhysicalRoot()
+ return getAdapter(obj, IPhysicallyLocatable).getRoot()
def traverse(place, path, default=_marker, request=None):
"""Traverse 'path' relative to 'place'
=== Zope3/src/zope/app/traversing/adapters.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/traversing/adapters.py:1.2 Mon Dec 30 11:11:57 2002
+++ Zope3/src/zope/app/traversing/adapters.py Wed Mar 19 12:55:37 2003
@@ -94,12 +94,12 @@
def __init__(self, context):
self.context = context
- def getPhysicalRoot(self):
+ def getRoot(self):
"See IPhysicallyLocatable"
container = getWrapperContainer(self.context)
if container is None:
raise TypeError("Not enough context to determine location root")
- return getAdapter(container, IPhysicallyLocatable).getPhysicalRoot()
+ return getAdapter(container, IPhysicallyLocatable).getRoot()
def getPhysicalPath(self):
"See IPhysicallyLocatable"
@@ -132,7 +132,7 @@
"See IPhysicallyLocatable"
return ('', )
- def getPhysicalRoot(self):
+ def getRoot(self):
"See IPhysicallyLocatable"
return self.context
@@ -166,7 +166,7 @@
# Start at the root
pop()
curr = getAdapter(self.context, IPhysicallyLocatable
- ).getPhysicalRoot()
+ ).getRoot()
try:
while path:
name = pop()