[Checkins] SVN: zope.container/trunk/ - Partially break dependency on ``zope.traversing`` by disusing

Chris McDonough chrism at plope.com
Thu May 14 22:41:50 EDT 2009


Log message for revision 99960:
  - Partially break dependency on ``zope.traversing`` by disusing
    zope.traversing.api.getPath in favor of using
    ILocationInfo(object).getPath().  The rest of the runtime
    dependencies on zope.traversing are currently interface
    dependencies.
  
  

Changed:
  U   zope.container/trunk/CHANGES.txt
  U   zope.container/trunk/src/zope/container/dependency.py

-=-
Modified: zope.container/trunk/CHANGES.txt
===================================================================
--- zope.container/trunk/CHANGES.txt	2009-05-14 21:58:20 UTC (rev 99959)
+++ zope.container/trunk/CHANGES.txt	2009-05-15 02:41:49 UTC (rev 99960)
@@ -5,6 +5,12 @@
 3.8.2 (unreleased)
 ------------------
 
+- Partially break dependency on ``zope.traversing`` by disusing
+  zope.traversing.api.getPath in favor of using
+  ILocationInfo(object).getPath().  The rest of the runtime
+  dependencies on zope.traversing are currently interface
+  dependencies.
+
 3.8.1 (2009-04-03)
 ------------------
 

Modified: zope.container/trunk/src/zope/container/dependency.py
===================================================================
--- zope.container/trunk/src/zope/container/dependency.py	2009-05-14 21:58:20 UTC (rev 99959)
+++ zope.container/trunk/src/zope/container/dependency.py	2009-05-15 02:41:49 UTC (rev 99960)
@@ -23,7 +23,7 @@
 from zope.i18nmessageid import Message
 from zope.container.i18n import ZopeMessageFactory as _
 from zope.app.dependable.interfaces import IDependable, DependencyError
-from zope.traversing.api import getPath
+from zope.location.interfaces import ILocationInfo
 
 exception_msg = _("""
 Removal of object (${object}) which has dependents (${dependents})
@@ -39,7 +39,8 @@
         dependents = dependency.dependents()
         if dependents:
             mapping = {
-                "object": getPath(object),
+                "object": ILocationInfo(object).getPath(),
                 "dependents": ", ".join(dependents)
                 }
             raise DependencyError(Message(exception_msg, mapping=mapping))
+



More information about the Checkins mailing list