zope.app.interface.PersistentInterface gets used properly for
persistent modules containing classes that subclass
zope.interface.Interface when those modules are are managed and
registered through managers and registries from zodbcode.  However,
similar persistent modules are broken when managed and registered
through managers and registries from zope.app.module.  Attached is a
diff against zope.app.module that adds a test demonstrating the
failure.

I'll create an issue in the collector if I can't fix this, but I hope
to fix it.

What I'd like to know is why zope.app.module seems to have totally
independent manager and registry implementaitons from those found in
zodbcode.  It looks like Fred Drake did a lot of the work on zodbcode
and Setphan Richter did a lot of the work on zope.app.module, so I was
hoping to learn something about the rationale from one or both of
you.  Is there any reason not to realign the implmentations in
zope.app.module with those in zodbcode?

I realize that most of this work was done long ago, but I appreciate
any insight.

Ross

Index: interfaces.txt
===================================================================
--- interfaces.txt	(revision 0)
+++ interfaces.txt	(revision 0)
@@ -0,0 +1,16 @@
+;-*-Doctest-*-
+=====================
+Persistent Interfaces
+=====================
+
+Verify that persistent interfaces cooperate::
+
+  >>> from zope.app.module.manager import ModuleManager
+  >>> manager = ModuleManager()
+
+  >>> manager.source = """\n
+  ... from zope.interface import Interface
+  ... class IFoo(Interface): pass
+  ... """
+  >>> manager.getModule()
+  <PersistentModule ...>
Index: tests.py
===================================================================
--- tests.py	(revision 72365)
+++ tests.py	(working copy)
@@ -34,7 +34,8 @@
 
 def test_suite():
     return unittest.TestSuite((
-        doctest.DocFileSuite('README.txt', setUp=setUp, tearDown=tearDown),
+        doctest.DocFileSuite('README.txt', 'interfaces.txt',
+                             setUp=setUp, tearDown=tearDown),
         ))
 
 if __name__ == "__main__":
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to