[Zope3-checkins] SVN: Zope3/trunk/src/zope/interface/declarations.py Merge from 3.3 branch:

Baiju M baiju.m.mail at gmail.com
Tue Sep 12 01:02:52 EDT 2006


Log message for revision 70113:
  Merge from 3.3 branch:
   Log message for revision 70112:
    Use types.ModuleType to check type of module.
  

Changed:
  U   Zope3/trunk/src/zope/interface/declarations.py

-=-
Modified: Zope3/trunk/src/zope/interface/declarations.py
===================================================================
--- Zope3/trunk/src/zope/interface/declarations.py	2006-09-12 04:51:16 UTC (rev 70112)
+++ Zope3/trunk/src/zope/interface/declarations.py	2006-09-12 05:02:51 UTC (rev 70113)
@@ -34,7 +34,7 @@
 from zope.interface.interface import InterfaceClass, Specification
 from ro import mergeOrderings, ro
 import exceptions
-from types import ClassType
+from types import ClassType, ModuleType
 from zope.interface.advice import addClassAdvisor
 
 # Registry of class-implementation specifications
@@ -1170,9 +1170,7 @@
         raise TypeError(
             "moduleProvides can only be used once in a module definition.")
 
-    module = sys.modules[__name__]
-
-    locals["__provides__"] = Provides(type(module),
+    locals["__provides__"] = Provides(ModuleType,
                                       *_normalizeargs(interfaces))
 
 ##############################################################################



More information about the Zope3-Checkins mailing list