[Zope3-checkins] CVS: Zope3/src/zope/app/services - configuration.py:1.14 hub.py:1.8 package.py:1.4 service.py:1.14 viewpackage.py:1.8

Albertas Agejevas alga@codeworks.lt
Wed, 19 Mar 2003 14:58:03 -0500


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

Modified Files:
	configuration.py hub.py package.py service.py viewpackage.py 
Log Message:
Renamed getPgysicalPathString() to getPath().

Got rid of getPhysicalPath() (which used to return a tuple) by replacing it
by getPath().


=== Zope3/src/zope/app/services/configuration.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/services/configuration.py:1.13	Wed Mar 19 12:55:36 2003
+++ Zope3/src/zope/app/services/configuration.py	Wed Mar 19 14:57:30 2003
@@ -44,7 +44,7 @@
      import Unregistered, Registered, Active
 
 from zope.app.traversing \
-     import getRoot, getPhysicalPathString, traverse, locationAsUnicode
+     import getRoot, getPath, traverse, locationAsUnicode
 
 
 class ConfigurationStatusProperty:
@@ -111,7 +111,7 @@
 
         # Get and check relative path
         prefix = "/++etc++Services/"
-        path = getPhysicalPathString(ob)
+        path = getPath(ob)
         lpackages = path.rfind(prefix)
         if lpackages < 0:
             raise ValueError("Configuration object is in an invalid location",
@@ -290,7 +290,7 @@
 
         if objectstatus == Active:
             try:
-                objectpath = getPhysicalPathString(configuration)
+                objectpath = getPath(configuration)
             except: # XXX
                 objectpath = str(configuration)
             raise DependencyError("Can't delete active configuration (%s)"
@@ -370,7 +370,7 @@
         "See IAddNotifiable"
         component = configuration.getComponent()
         dependents = getAdapter(component, IDependable)
-        objectpath = getPhysicalPathString(configuration)
+        objectpath = getPath(configuration)
         dependents.addDependent(objectpath)
 
     def beforeDeleteHook(self, configuration, container):
@@ -379,7 +379,7 @@
               ).beforeDeleteHook(configuration, container)
         component = configuration.getComponent()
         dependents = getAdapter(component, IDependable)
-        objectpath = getPhysicalPathString(configuration)
+        objectpath = getPath(configuration)
         dependents.removeDependent(objectpath)
 
 


=== Zope3/src/zope/app/services/hub.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/hub.py:1.7	Wed Mar 19 13:05:03 2003
+++ Zope3/src/zope/app/services/hub.py	Wed Mar 19 14:57:30 2003
@@ -26,7 +26,7 @@
 from zodb.btrees.OIBTree import OIBTree
 
 #from zope.app.traversing import getPath, canonicalPath
-from zope.app.traversing import getPhysicalPathString as getPath
+from zope.app.traversing import getPath
 from zope.app.traversing import locationAsUnicode as canonicalPath
 
 from zope.component import getAdapter


=== Zope3/src/zope/app/services/package.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/services/package.py:1.3	Mon Dec 30 15:42:46 2002
+++ Zope3/src/zope/app/services/package.py	Wed Mar 19 14:57:31 2003
@@ -21,7 +21,7 @@
 from zope.app.component.nextservice import getNextServiceManager
 from zope.app.container.btree import BTreeContainer
 from zope.app.services.configurationmanager import ConfigurationManager
-from zope.app.traversing import getPhysicalPathString
+from zope.app.traversing import getPath
 
 from zope.proxy.context import ContextMethod
 from zope.proxy.context import ContextWrapper
@@ -46,7 +46,7 @@
 
     def queryComponent(self, type=None, filter=None, all=0):
         local = []
-        path = getPhysicalPathString(self)
+        path = getPath(self)
         for pkg_name in self:
             package = ContextWrapper(self[pkg_name], self, name=pkg_name)
             for name in package:


=== Zope3/src/zope/app/services/service.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/services/service.py:1.13	Tue Mar 18 16:02:22 2003
+++ Zope3/src/zope/app/services/service.py	Wed Mar 19 14:57:31 2003
@@ -61,7 +61,7 @@
 from zope.app.interfaces.services.configuration import IUseConfigurable
 from zope.app.interfaces.services.service import ILocalService
 
-from zope.app.traversing import getPhysicalPathString
+from zope.app.traversing import getPath
 
 class ServiceManager(PersistentModuleRegistry, NameComponentConfigurable):
 
@@ -134,7 +134,7 @@
 
     def queryComponent(self, type=None, filter=None, all=0):
         local = []
-        path = getPhysicalPathString(self)
+        path = getPath(self)
         for pkg_name in self:
             package = ContextWrapper(self[pkg_name], self, name=pkg_name)
             for name in package:
@@ -321,12 +321,12 @@
                                                  container)
         service = configuration.getComponent()
         adapter = getAdapter(service, IUseConfiguration)
-        adapter.addUsage(getPhysicalPathString(configuration))
+        adapter.addUsage(getPath(configuration))
 
     def beforeDeleteHook(self, configuration, container):
         service = configuration.getComponent()
         adapter = getAdapter(service, IUseConfiguration)
-        adapter.removeUsage(getPhysicalPathString(configuration))
+        adapter.removeUsage(getPath(configuration))
         NamedComponentConfiguration.beforeDeleteHook(self,
                                                      configuration,
                                                      container)


=== Zope3/src/zope/app/services/viewpackage.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/viewpackage.py:1.7	Tue Mar 11 11:11:22 2003
+++ Zope3/src/zope/app/services/viewpackage.py	Wed Mar 19 14:57:31 2003
@@ -20,7 +20,7 @@
 from zope.app.container.btree import BTreeContainer
 from zope.app.interfaces.services.view import IZPTTemplate
 from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.app.traversing import getPhysicalPathString, traverse
+from zope.app.traversing import getPath, traverse
 from zope.proxy.context import getItem, getAttr
 from zope.proxy.context import ContextMethod
 from zope.app.interfaces.services.configuration import Active
@@ -56,7 +56,7 @@
 
         name = super(ViewPackage, base).setObject(name, object)
         template = getItem(self, name)
-        template = getPhysicalPathString(template)
+        template = getPath(template)
         config = PageConfiguration(
             forInterface=self.forInterface,
             viewName=name,