Commit dce350bb authored by Chris McDonough's avatar Chris McDonough

- 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.
parent 552836db
......@@ -5,6 +5,12 @@ CHANGES
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)
------------------
......
......@@ -23,7 +23,7 @@ __docformat__ = 'restructuredtext'
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 @@ def CheckDependency(event):
dependents = dependency.dependents()
if dependents:
mapping = {
"object": getPath(object),
"object": ILocationInfo(object).getPath(),
"dependents": ", ".join(dependents)
}
raise DependencyError(Message(exception_msg, mapping=mapping))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment