[Checkins] SVN: grok/trunk/ Fixed the Exception view test failure.

Souheil CHELFOUH souheil at chelfouh.com
Tue Jul 6 14:41:35 EDT 2010


Log message for revision 114264:
  Fixed the Exception view test failure.
  Removed unused packages dependencies.
  The flash method of the grok.View now uses the grokcore.message package.
  Unused imports have been removed (some deprecated imports have been left for backward compatibility)
  

Changed:
  U   grok/trunk/CHANGES.txt
  U   grok/trunk/setup.py
  U   grok/trunk/src/grok/components.py
  U   grok/trunk/src/grok/util.py

-=-
Modified: grok/trunk/CHANGES.txt
===================================================================
--- grok/trunk/CHANGES.txt	2010-07-06 18:26:45 UTC (rev 114263)
+++ grok/trunk/CHANGES.txt	2010-07-06 18:41:35 UTC (rev 114264)
@@ -8,6 +8,14 @@
   can still use z3c.testsetup with grok, but have to declare the
   dependency in your project's ``setup.py`` explicitly.
 
+* the grok.View component now uses the grokcore.message package for
+  its `flash` method.
+
+* Grok test zcml now explicitly sets a defaultView name (to
+  `index.html`). This has been added since we no longer depend on
+  packages such as zope.app.zcmlfiles, that used to take care of that
+  configuration step.
+
 1.1rc1 (2010-02-25)
 ===================
 

Modified: grok/trunk/setup.py
===================================================================
--- grok/trunk/setup.py	2010-07-06 18:26:45 UTC (rev 114263)
+++ grok/trunk/setup.py	2010-07-06 18:41:35 UTC (rev 114264)
@@ -46,6 +46,7 @@
         'grokcore.annotation >= 1.1',
         'grokcore.component >= 1.5, < 2.0',
         'grokcore.content',
+        'grokcore.message',
         'grokcore.formlib >= 1.4',
         'grokcore.security >= 1.1',
         'grokcore.site',
@@ -55,7 +56,6 @@
         'pytz',
         'simplejson',
         'z3c.autoinclude',
-        'z3c.flashmessage',
         'zc.catalog',
         'zope.annotation',
         'zope.app.appsetup',
@@ -66,27 +66,26 @@
         'zope.component',
         'zope.container',
         'zope.copypastemove',
-        'zope.dottedname',
         'zope.event',
         'zope.exceptions',
         'zope.i18n',
-        'zope.i18nmessageid',
         'zope.interface',
         'zope.intid',
         'zope.keyreference',
         'zope.lifecycleevent',
         'zope.location',
-        'zope.pagetemplate',
         'zope.password',
-        'zope.pluggableauth',
         'zope.principalregistry',
-        'zope.proxy',
         'zope.publisher',
         'zope.schema',
         'zope.security',
         'zope.securitypolicy',
         'zope.site',
         'zope.traversing',
+        'zope.app.wsgi',
+        'zope.contentprovider',
+        'zope.login',
+        'zope.session',
         ],
     tests_require=tests_require,
     extras_require={'test': tests_require},

Modified: grok/trunk/src/grok/components.py
===================================================================
--- grok/trunk/src/grok/components.py	2010-07-06 18:26:45 UTC (rev 114263)
+++ grok/trunk/src/grok/components.py	2010-07-06 18:41:35 UTC (rev 114264)
@@ -29,20 +29,18 @@
 from zope.publisher.interfaces.browser import IBrowserPublisher
 from zope.publisher.interfaces.http import IHTTPRequest
 from zope.publisher.publish import mapply
-from zope.annotation.interfaces import IAttributeAnnotatable
-
 from zope.publisher.defaultview import getDefaultViewName
-from zope.container.btree import BTreeContainer
-from zope.container.contained import Contained
 from zope.container.interfaces import IReadContainer
 
 import grok
-import z3c.flashmessage.interfaces
 import martian.util
 
 import grokcore.view
 import grokcore.site
+import grokcore.message
 from grok import interfaces, util
+
+# BBB this is for import backward compatibility.
 from grokcore.content import Model, Container, OrderedContainer
 
 
@@ -138,13 +136,9 @@
 
     def flash(self, message, type='message'):
         """Send a short message to the user."""
-        # XXX this has no tests or documentation, anywhere
-        source = component.getUtility(
-            z3c.flashmessage.interfaces.IMessageSource, name='session')
-        source.send(message, type)
+        grokcore.message.send(message, type=type, name='session')
 
 
-
 class Form(grokcore.formlib.Form, View):
     """The base class for forms in Grok applications.
 

Modified: grok/trunk/src/grok/util.py
===================================================================
--- grok/trunk/src/grok/util.py	2010-07-06 18:26:45 UTC (rev 114263)
+++ grok/trunk/src/grok/util.py	2010-07-06 18:41:35 UTC (rev 114264)
@@ -15,8 +15,8 @@
 """
 import grok
 import grok.interfaces
-import zope.event
 import zope.location.location
+
 from zope import interface
 from zope.schema.interfaces import WrongType
 from zope.security.checker import NamesChecker, defineChecker



More information about the checkins mailing list