[Checkins] SVN: z3c.pagelet/trunk/ Got rid of dependency on ``zope.app.component`` by requiring ``zope.component >= 3.7``.

Michael Howitz mh at gocept.com
Thu May 28 14:45:49 EDT 2009


Log message for revision 100514:
  Got rid of dependency on ``zope.app.component`` by requiring ``zope.component >= 3.7``.
  

Changed:
  U   z3c.pagelet/trunk/CHANGES.txt
  U   z3c.pagelet/trunk/setup.py
  U   z3c.pagelet/trunk/src/z3c/pagelet/zcml.py

-=-
Modified: z3c.pagelet/trunk/CHANGES.txt
===================================================================
--- z3c.pagelet/trunk/CHANGES.txt	2009-05-28 17:22:40 UTC (rev 100513)
+++ z3c.pagelet/trunk/CHANGES.txt	2009-05-28 18:45:49 UTC (rev 100514)
@@ -5,7 +5,8 @@
 1.0.4 (unreleased)
 ------------------
 
-* ...
+* Got rid of dependency on ``zope.app.component`` by requiring
+  ``zope.component >= 3.7``.
 
 
 1.0.3 (2009-02-27)
@@ -15,7 +16,7 @@
 
 * Add support for context-specific layout and content template lookup,
   using (view, request, context) discriminator. This is compatible with
-  context-specific templates introduced in z3c.template 1.2.0. 
+  context-specific templates introduced in z3c.template 1.2.0.
 
 * Don't do rendering in pagelet's __call__ method when request is a redirection.
 

Modified: z3c.pagelet/trunk/setup.py
===================================================================
--- z3c.pagelet/trunk/setup.py	2009-05-28 17:22:40 UTC (rev 100513)
+++ z3c.pagelet/trunk/setup.py	2009-05-28 18:45:49 UTC (rev 100514)
@@ -63,6 +63,7 @@
                 'lxml>=2.1.1',
                 'z3c.pt>=1.0b4',
                 'z3c.ptcompat',
+                'zope.app.security',
                 ],
         docs = ['z3c.recipe.sphinxdoc'],
         ),
@@ -70,9 +71,9 @@
         'setuptools',
         'z3c.template>=1.2.0',
         'z3c.ptcompat',
-        'zope.app.component', # TODO: these are only needed for ZCML directives, so can copy
+         # TODO: this is only needed for ZCML directives, so can copy
         'zope.app.publisher', # things we use from there and get rid of the dependencies.
-        'zope.component',
+        'zope.component>=3.7.0',
         'zope.configuration',
         'zope.contentprovider',
         'zope.formlib', # TODO: get rid of hard dependency on zope.formlib

Modified: z3c.pagelet/trunk/src/z3c/pagelet/zcml.py
===================================================================
--- z3c.pagelet/trunk/src/z3c/pagelet/zcml.py	2009-05-28 17:22:40 UTC (rev 100513)
+++ z3c.pagelet/trunk/src/z3c/pagelet/zcml.py	2009-05-28 18:45:49 UTC (rev 100514)
@@ -18,6 +18,7 @@
 
 import zope.interface
 import zope.component
+import zope.component.zcml
 import zope.schema
 import zope.configuration.fields
 import zope.security.checker
@@ -26,13 +27,12 @@
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from zope.app.publisher.browser import viewmeta
-from zope.app.component import metadirectives
 
 from z3c.pagelet import interfaces
 from z3c.pagelet import browser
 
 
-class IPageletDirective(metadirectives.IBasicViewInformation):
+class IPageletDirective(zope.component.zcml.IBasicViewInformation):
     """A directive to register a new pagelet.
 
     The pagelet directive also supports an undefined set of keyword arguments
@@ -78,8 +78,8 @@
 
 # pagelet directive
 def pageletDirective(
-    _context, class_, name, permission, for_=zope.interface.Interface, 
-    layer=IDefaultBrowserLayer, provides=interfaces.IPagelet, 
+    _context, class_, name, permission, for_=zope.interface.Interface,
+    layer=IDefaultBrowserLayer, provides=interfaces.IPagelet,
     allowed_interface=None, allowed_attributes=None, **kwargs):
 
     # Security map dictionary
@@ -114,7 +114,7 @@
     viewmeta._handle_allowed_attributes(
         _context, kwargs.keys(), permission, required)
     viewmeta._handle_allowed_attributes(
-        _context, ('__call__', 'browserDefault', 'update', 'render', 
+        _context, ('__call__', 'browserDefault', 'update', 'render',
                    'publishTraverse'), permission, required)
 
     # Register the interfaces.
@@ -125,7 +125,7 @@
         zope.interface.classImplements(new_class, provides)
 
     # Create the security checker for the new class
-    zope.security.checker.defineChecker(new_class, 
+    zope.security.checker.defineChecker(new_class,
         zope.security.checker.Checker(required))
 
     # register pagelet



More information about the Checkins mailing list