[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/a Move zope.app.annotation to zope.annotation.

Philipp von Weitershausen philikon at philikon.de
Thu Apr 6 14:50:03 EDT 2006


Log message for revision 66599:
  Move zope.app.annotation to zope.annotation.
  

Changed:
  A   Zope3/branches/jim-adapter/src/zope/annotation/
  U   Zope3/branches/jim-adapter/src/zope/annotation/README.txt
  U   Zope3/branches/jim-adapter/src/zope/annotation/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/annotation/_factory.py
  U   Zope3/branches/jim-adapter/src/zope/annotation/attribute.py
  U   Zope3/branches/jim-adapter/src/zope/annotation/configure.zcml
  U   Zope3/branches/jim-adapter/src/zope/annotation/tests/annotations.py
  U   Zope3/branches/jim-adapter/src/zope/annotation/tests/test_attributeannotations.py
  D   Zope3/branches/jim-adapter/src/zope/app/annotation/

-=-
Copied: Zope3/branches/jim-adapter/src/zope/annotation (from rev 66532, Zope3/branches/jim-adapter/src/zope/app/annotation)

Modified: Zope3/branches/jim-adapter/src/zope/annotation/README.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/README.txt	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/README.txt	2006-04-06 18:50:02 UTC (rev 66599)
@@ -11,7 +11,7 @@
   >>> from zope import interface
   >>> class IFoo(interface.Interface):
   ...     pass
-  >>> from zope.app.annotation.interfaces import IAttributeAnnotatable
+  >>> from zope.annotation.interfaces import IAttributeAnnotatable
   >>> from persistent import Persistent
   >>> class Foo(Persistent):
   ...     interface.implements(IFoo, IAttributeAnnotatable)
@@ -37,9 +37,9 @@
 to its `__init__`. Otherwise it's basically an adapter.
 
 Now, we'll register the annotation as an adapter. Do do this we use
-the `factory` function provided by `zope.app.annotation`:
+the `factory` function provided by `zope.annotation`:
 
-  >>> from zope.app.annotation import factory
+  >>> from zope.annotation import factory
   >>> component.provideAdapter(factory(Bar))
 
 Note that we do not need to specify what the adapter provides or what

Modified: Zope3/branches/jim-adapter/src/zope/annotation/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/__init__.py	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/__init__.py	2006-04-06 18:50:02 UTC (rev 66599)
@@ -16,6 +16,6 @@
 $Id$
 """
 
-from zope.app.annotation.interfaces import IAttributeAnnotatable
-from zope.app.annotation.interfaces import IAnnotations
-from zope.app.annotation._factory import factory
+from zope.annotation.interfaces import IAttributeAnnotatable
+from zope.annotation.interfaces import IAnnotations
+from zope.annotation._factory import factory

Modified: Zope3/branches/jim-adapter/src/zope/annotation/_factory.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/_factory.py	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/_factory.py	2006-04-06 18:50:02 UTC (rev 66599)
@@ -1,6 +1,6 @@
 import zope.component
 import zope.interface
-from zope.app.annotation.interfaces import IAnnotations
+from zope.annotation.interfaces import IAnnotations
 import zope.app.container.contained
 
 def factory(factory, key=None):

Modified: Zope3/branches/jim-adapter/src/zope/annotation/attribute.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/attribute.py	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/attribute.py	2006-04-06 18:50:02 UTC (rev 66599)
@@ -21,9 +21,8 @@
 from BTrees.OOBTree import OOBTree
 
 from zope import component, interface
+from zope.annotation import interfaces
 
-from zope.app.annotation import interfaces
-
 class AttributeAnnotations(DictMixin):
     """Store annotations on an object
 
@@ -40,7 +39,7 @@
         return bool(getattr(self.obj, '__annotations__', 0))
 
     def get(self, key, default=None):
-        """See zope.app.annotation.interfaces.IAnnotations"""
+        """See zope.annotation.interfaces.IAnnotations"""
         annotations = getattr(self.obj, '__annotations__', None)
         if not annotations:
             return default
@@ -62,7 +61,7 @@
         return annotations.keys()
 
     def __setitem__(self, key, value):
-        """See zope.app.annotation.interfaces.IAnnotations"""
+        """See zope.annotation.interfaces.IAnnotations"""
         try:
             annotations = self.obj.__annotations__
         except AttributeError:

Modified: Zope3/branches/jim-adapter/src/zope/annotation/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/configure.zcml	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/configure.zcml	2006-04-06 18:50:02 UTC (rev 66599)
@@ -1,7 +1,5 @@
-<configure 
-    xmlns="http://namespaces.zope.org/zope">
+<configure xmlns="http://namespaces.zope.org/zope">
 
-
   <adapter
       for=".interfaces.IAttributeAnnotatable"
       provides=".interfaces.IAnnotations"

Modified: Zope3/branches/jim-adapter/src/zope/annotation/tests/annotations.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/tests/annotations.py	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/tests/annotations.py	2006-04-06 18:50:02 UTC (rev 66599)
@@ -20,7 +20,7 @@
 """
 import unittest
 from zope.interface.verify import verifyObject
-from zope.app.annotation.interfaces import IAnnotations
+from zope.annotation.interfaces import IAnnotations
 
 class AnnotationsTest(unittest.TestCase):
     """Test the IAnnotations interface.

Modified: Zope3/branches/jim-adapter/src/zope/annotation/tests/test_attributeannotations.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/annotation/tests/test_attributeannotations.py	2006-04-05 13:52:36 UTC (rev 66532)
+++ Zope3/branches/jim-adapter/src/zope/annotation/tests/test_attributeannotations.py	2006-04-06 18:50:02 UTC (rev 66599)
@@ -18,11 +18,11 @@
 """
 import unittest, doctest
 from zope.testing import cleanup
-from zope.app.annotation.tests.annotations import AnnotationsTest
-from zope.app.annotation.attribute import AttributeAnnotations
-from zope.app.annotation.interfaces import IAttributeAnnotatable
 from zope.interface import implements
 from zope import component
+from zope.annotation.tests.annotations import AnnotationsTest
+from zope.annotation.attribute import AttributeAnnotations
+from zope.annotation.interfaces import IAttributeAnnotatable
 
 class Dummy(object):
     implements(IAttributeAnnotatable)
@@ -47,9 +47,5 @@
         doctest.DocFileSuite('../README.txt', setUp=setUp, tearDown=tearDown)
         ))
 
-    #return makeSuite(AttributeAnnotationsTest)
-    #    doctest.DocFileSuite('README.txt',
-    #                         setUp=setUp, tearDown=tearDown),
-
 if __name__=='__main__':
     unittest.main(defaultTest='test_suite')



More information about the Zope3-Checkins mailing list