[Checkins] SVN: zope.app.exception/trunk/ - Removed dependency on ``zope.formlib`` by requiring newer version of

Michael Howitz mh at gocept.com
Mon May 18 16:08:41 EDT 2009


Log message for revision 100113:
  - Removed dependency on ``zope.formlib`` by requiring newer version of
    ``zope.app.pagetemplate`` which now contains ``namedtemplate``.
  
  

Changed:
  U   zope.app.exception/trunk/CHANGES.txt
  U   zope.app.exception/trunk/setup.py
  U   zope.app.exception/trunk/src/zope/app/exception/browser/tests/test_unauthorized.py
  U   zope.app.exception/trunk/src/zope/app/exception/browser/unauthorized.py

-=-
Modified: zope.app.exception/trunk/CHANGES.txt
===================================================================
--- zope.app.exception/trunk/CHANGES.txt	2009-05-18 20:04:32 UTC (rev 100112)
+++ zope.app.exception/trunk/CHANGES.txt	2009-05-18 20:08:41 UTC (rev 100113)
@@ -7,7 +7,10 @@
 - ``ISystemErrorView`` interface has been moved to
   ``zope.browser.interfaces``, leaving BBB import here.
 
+- Cut dependency on ``zope.formlib`` by requiring newer version of
+  ``zope.app.pagetemplate`` which now contains ``namedtemplate``.
 
+
 3.5.0 (2009-04-06)
 ------------------
 

Modified: zope.app.exception/trunk/setup.py
===================================================================
--- zope.app.exception/trunk/setup.py	2009-05-18 20:04:32 UTC (rev 100112)
+++ zope.app.exception/trunk/setup.py	2009-05-18 20:08:41 UTC (rev 100113)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006-2009 Zope Corporation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
@@ -60,9 +60,7 @@
           'zope.app.zptpage',
       ]),
       install_requires=['setuptools',
-                        'zope.app.pagetemplate',
-                        # This is a dependency we can avaid:
-                        'zope.formlib',
+                        'zope.app.pagetemplate>=3.6',
                         'zope.interface',
                         'zope.publisher',
                         'zope.browser>=1.2',

Modified: zope.app.exception/trunk/src/zope/app/exception/browser/tests/test_unauthorized.py
===================================================================
--- zope.app.exception/trunk/src/zope/app/exception/browser/tests/test_unauthorized.py	2009-05-18 20:04:32 UTC (rev 100112)
+++ zope.app.exception/trunk/src/zope/app/exception/browser/tests/test_unauthorized.py	2009-05-18 20:08:41 UTC (rev 100113)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# Copyright (c) 2001-2009 Zope Corporation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
@@ -17,7 +17,7 @@
 """
 from unittest import TestCase, main, makeSuite
 from zope import component, interface
-import zope.formlib.namedtemplate
+import zope.app.pagetemplate.namedtemplate
 from zope.publisher.browser import TestRequest
 from zope.authentication.interfaces import IAuthentication
 from zope.security.interfaces import IPrincipal
@@ -45,13 +45,13 @@
         if self.status is not None:
             self.request.response.setStatus(self.status)
 
-class DummyTemplate (object):
+class DummyTemplate(object):
 
     def __init__(self, context):
         self.context = context
 
     component.adapts(Unauthorized)
-    interface.implements(zope.formlib.namedtemplate.INamedTemplate)
+    interface.implements(zope.app.pagetemplate.namedtemplate.INamedTemplate)
 
     def __call__(self):
         return 'You are not authorized'
@@ -83,7 +83,7 @@
 
         # Make sure the response status was set
         self.assertEqual(request.response.getStatus(), 403)
-        
+
         # check headers that work around squid "negative_ttl"
         self.assertEqual(request.response.getHeader('Expires'),
                          'Mon, 26 Jul 1997 05:00:00 GMT')
@@ -105,9 +105,9 @@
         request = TestRequest()
         request.setPrincipal(DummyPrincipal(23))
         u = Unauthorized(exception, request)
-        
+
         self.auth.status = 303
-        
+
         res = u()
 
         # Make sure that the template was not rendered

Modified: zope.app.exception/trunk/src/zope/app/exception/browser/unauthorized.py
===================================================================
--- zope.app.exception/trunk/src/zope/app/exception/browser/unauthorized.py	2009-05-18 20:04:32 UTC (rev 100112)
+++ zope.app.exception/trunk/src/zope/app/exception/browser/unauthorized.py	2009-05-18 20:08:41 UTC (rev 100113)
@@ -19,7 +19,7 @@
 
 from zope.authentication.interfaces import IAuthentication
 from zope.publisher.browser import BrowserPage
-from zope.formlib import namedtemplate
+from zope.app.pagetemplate import namedtemplate
 from zope.component import getUtility
 from zope.app.pagetemplate import ViewPageTemplateFile
 



More information about the Checkins mailing list