[Checkins] SVN: zc.displayname/trunk/src/zc/displayname/adapters. Get rid of unit test deprecations

Gary Poster gary at zope.com
Thu Apr 27 23:25:23 EDT 2006


Log message for revision 67682:
  Get rid of unit test deprecations
  

Changed:
  U   zc.displayname/trunk/src/zc/displayname/adapters.py
  U   zc.displayname/trunk/src/zc/displayname/adapters.txt

-=-
Modified: zc.displayname/trunk/src/zc/displayname/adapters.py
===================================================================
--- zc.displayname/trunk/src/zc/displayname/adapters.py	2006-04-28 03:24:37 UTC (rev 67681)
+++ zc.displayname/trunk/src/zc/displayname/adapters.py	2006-04-28 03:25:22 UTC (rev 67682)
@@ -19,13 +19,13 @@
 from zope import interface, component, i18n, proxy
 from zope.i18nmessageid import Message
 from zope.security.interfaces import Unauthorized
-import zope.app.dublincore.interfaces
-import zope.app.location.interfaces
+import zope.dublincore.interfaces
+import zope.location.interfaces
 from zope.app import zapi
 from zope.publisher.interfaces import IRequest
 from zope.publisher.interfaces.http import IHTTPRequest
-from zope.app.publisher.browser import BrowserView
-from zope.app.traversing.interfaces import IContainmentRoot
+from zope.publisher.browser import BrowserView
+from zope.traversing.interfaces import IContainmentRoot
 
 from zc.displayname import interfaces
 from zc.displayname.i18n import _
@@ -35,14 +35,14 @@
                        "information.")
 
 class DefaultDisplayNameGenerator(BrowserView):
-    component.adapts(zope.app.location.interfaces.ILocation, IRequest)
+    component.adapts(zope.location.interfaces.ILocation, IRequest)
     interface.implementsOnly(interfaces.IDisplayNameGenerator)
 
     def __call__(self, maxlength=None):
         ob = self.context
         try:
             try:
-                dc = zope.app.dublincore.interfaces.IDCDescriptiveProperties(ob)
+                dc = zope.dublincore.interfaces.IDCDescriptiveProperties(ob)
             except TypeError:
                 name = ob.__name__
             else:
@@ -134,14 +134,14 @@
             base = tuple(view(maxlength))
         return base
 
- at component.adapter(zope.app.location.interfaces.ILocation, IHTTPRequest)
+ at component.adapter(zope.location.interfaces.ILocation, IHTTPRequest)
 @interface.implementer(interface.Interface)
 def breadcrumbs(context, request):
     "breadcrumbs; unlimited display name length for each traversed object"
     return component.getMultiAdapter(
         (context, request), interfaces.IBreadcrumbs)()
 
- at component.adapter(zope.app.location.interfaces.ILocation, IHTTPRequest)
+ at component.adapter(zope.location.interfaces.ILocation, IHTTPRequest)
 @interface.implementer(interface.Interface)
 def breadcrumbs20char(context, request):
     "breadcrumbs; display name length limited to 20 characters for each object"

Modified: zc.displayname/trunk/src/zc/displayname/adapters.txt
===================================================================
--- zc.displayname/trunk/src/zc/displayname/adapters.txt	2006-04-28 03:24:37 UTC (rev 67681)
+++ zc.displayname/trunk/src/zc/displayname/adapters.txt	2006-04-28 03:25:22 UTC (rev 67682)
@@ -12,16 +12,16 @@
 interface.
 
 Given an ILocation that can be adapted to 
-zope.app.dublincore.interfaces.IDCDescriptiveProperties, and that actually has
+zope.dublincore.interfaces.IDCDescriptiveProperties, and that actually has
 a value for it, it returns the DC title; otherwise, it uses __name__.
 
-    >>> import zope.app.dublincore.interfaces
-    >>> import zope.app.location.interfaces
+    >>> import zope.dublincore.interfaces
+    >>> import zope.location.interfaces
     >>> from zc.displayname import interfaces, adapters
     >>> from zope.interface import verify
     >>> from zope import interface
     >>> class Dummy(object):
-    ...     interface.implements(zope.app.location.interfaces.ILocation)
+    ...     interface.implements(zope.location.interfaces.ILocation)
     ...     def __init__(self, parent, name):
     ...         self.__parent__ = parent
     ...         self.__name__ = name
@@ -48,11 +48,11 @@
     >>> g(2)
     '??'
     >>> interface.directlyProvides(
-    ...     d, zope.app.dublincore.interfaces.IDCDescriptiveProperties)
+    ...     d, zope.dublincore.interfaces.IDCDescriptiveProperties)
     >>> d.title = 'My Special Dummy'
     >>> d.description = 'My interface said I had to have this'
     >>> verify.verifyObject(
-    ...     zope.app.dublincore.interfaces.IDCDescriptiveProperties, d)
+    ...     zope.dublincore.interfaces.IDCDescriptiveProperties, d)
     True
     >>> g()
     'My Special Dummy'
@@ -78,7 +78,7 @@
 for an ILocation within a hierarchy with an IContainmentRoot as a root node.
 
 
-    >>> from zope.app.traversing.interfaces import IContainmentRoot
+    >>> from zope.traversing.interfaces import IContainmentRoot
     >>> class DummyContainmentRoot(object):
     ...     zope.interface.implements(IContainmentRoot)
     ...
@@ -92,8 +92,8 @@
     >>> component.provideAdapter(adapters.DefaultDisplayNameGenerator)
     >>> component.provideAdapter(adapters.SiteDisplayNameGenerator)
     >>> from zope.publisher.interfaces.http import IHTTPRequest
-    >>> from zope.app.traversing.browser.interfaces import IAbsoluteURL
-    >>> from zope.app.traversing import browser
+    >>> from zope.traversing.browser.interfaces import IAbsoluteURL
+    >>> from zope.traversing import browser
     >>> component.provideAdapter(
     ...     browser.AbsoluteURL, adapts=(None, IHTTPRequest), 
     ...     provides=IAbsoluteURL)



More information about the Checkins mailing list