[Checkins] SVN: zope.app.publication/tags/3.4.4/ make a 3.4.4. This just has a backport from trunk, and a versions section from the Zope 3.4 KGS so I could run tests.

Gary Poster gary.poster at canonical.com
Wed Aug 12 21:22:26 EDT 2009


Log message for revision 102723:
  make a 3.4.4.  This just has a backport from trunk, and a versions section from the Zope 3.4 KGS so I could run tests.

Changed:
  U   zope.app.publication/tags/3.4.4/CHANGES.txt
  U   zope.app.publication/tags/3.4.4/buildout.cfg
  U   zope.app.publication/tags/3.4.4/setup.py
  U   zope.app.publication/tags/3.4.4/src/zope/app/publication/tests/test_zopepublication.py
  U   zope.app.publication/tags/3.4.4/src/zope/app/publication/zopepublication.py

-=-
Modified: zope.app.publication/tags/3.4.4/CHANGES.txt
===================================================================
--- zope.app.publication/tags/3.4.4/CHANGES.txt	2009-08-12 23:06:07 UTC (rev 102722)
+++ zope.app.publication/tags/3.4.4/CHANGES.txt	2009-08-13 01:22:26 UTC (rev 102723)
@@ -2,6 +2,13 @@
 CHANGES
 =======
 
+3.4.4 (2009-08-12)
+------------------
+
+- An abort within handleExceptions could have failed without logging what
+  caused the error. It now logs the original problem.  This is a back-port
+  from trunk (what is currently slated for 3.8.2).
+
 3.4.3 (2007-11-01)
 ------------------
 

Modified: zope.app.publication/tags/3.4.4/buildout.cfg
===================================================================
--- zope.app.publication/tags/3.4.4/buildout.cfg	2009-08-12 23:06:07 UTC (rev 102722)
+++ zope.app.publication/tags/3.4.4/buildout.cfg	2009-08-13 01:22:26 UTC (rev 102723)
@@ -1,8 +1,180 @@
 [buildout]
 develop = .
 parts = test
+versions = versions
 
 [test]
 recipe = zc.recipe.testrunner
 eggs = zope.app.publication [test]
 
+[versions]
+ClientForm = 0.2.9
+RestrictedPython = 3.4.2
+ZConfig = 2.5.1
+ZODB3 = 3.8.2
+docutils = 0.4
+jquery.javascript = 1.0.0
+jquery.layer = 1.0.0
+lxml = 1.3.6
+mechanize = 0.1.7b
+pytz = 2007k
+setuptools = 0.6c9
+z3c.coverage = 1.1.2
+z3c.csvvocabulary = 1.0.0
+z3c.etestbrowser = 1.0.4
+z3c.form = 1.9.0
+z3c.formdemo = 1.5.3
+z3c.formjs = 0.4.0
+z3c.formjsdemo = 0.3.1
+z3c.formui = 1.4.2
+z3c.i18n = 0.1.1
+z3c.layer = 0.2.3
+z3c.macro = 1.1.0
+z3c.macroviewlet = 1.0.0
+z3c.menu = 0.2.0
+z3c.optionstorage = 1.0.4
+z3c.pagelet = 1.0.2
+z3c.rml = 0.7.3
+z3c.skin.pagelet = 1.0.2
+z3c.template = 1.1.0
+z3c.testing = 0.2.0
+z3c.traverser = 0.2.3
+z3c.viewlet = 1.0.0
+z3c.viewtemplate = 0.3.2
+z3c.zrtresource = 1.0.1
+zc.buildout = 1.1.1
+zc.catalog = 1.2.0
+zc.datetimewidget = 0.5.2
+zc.i18n = 0.5.2
+zc.recipe.egg = 1.0.0
+zc.recipe.filestorage = 1.0.0
+zc.recipe.testrunner = 1.0.0
+zc.resourcelibrary = 1.0.1
+zc.table = 0.6
+zc.zope3recipes = 0.6.2
+zdaemon = 2.0.2
+zodbcode = 3.4.0
+zope.annotation = 3.4.1
+zope.app.annotation = 3.4.0
+zope.app.apidoc = 3.4.3
+zope.app.applicationcontrol = 3.4.3
+zope.app.appsetup = 3.4.1
+zope.app.authentication = 3.4.4
+zope.app.basicskin = 3.4.0
+zope.app.boston = 3.4.0
+zope.app.broken = 3.4.0
+zope.app.cache = 3.4.1
+zope.app.catalog = 3.5.1
+zope.app.component = 3.4.1
+zope.app.container = 3.5.6
+zope.app.content = 3.4.0
+zope.app.dav = 3.4.1
+zope.app.debug = 3.4.1
+zope.app.debugskin = 3.4.0
+zope.app.dependable = 3.4.0
+zope.app.dtmlpage = 3.4.1
+zope.app.error = 3.5.1
+zope.app.exception = 3.4.1
+zope.app.externaleditor = 3.4.0
+zope.app.file = 3.4.4
+zope.app.folder = 3.4.0
+zope.app.form = 3.4.1
+zope.app.ftp = 3.4.0
+zope.app.generations = 3.4.1
+zope.app.homefolder = 3.4.0
+zope.app.http = 3.4.1
+zope.app.i18n = 3.4.4
+zope.app.i18nfile = 3.4.1
+zope.app.interface = 3.4.0
+zope.app.interpreter = 3.4.0
+zope.app.intid = 3.4.1
+zope.app.keyreference = 3.4.1
+zope.app.layers = 3.4.0
+zope.app.locales = 3.4.5
+zope.app.locking = 3.4.0
+zope.app.module = 3.4.0
+zope.app.onlinehelp = 3.4.1
+zope.app.pagetemplate = 3.4.1
+zope.app.pluggableauth = 3.4.0
+zope.app.preference = 3.4.1
+zope.app.preview = 3.4.0
+zope.app.principalannotation = 3.4.0
+# zope.app.publication = 3.4.3
+zope.app.publisher = 3.4.1
+zope.app.pythonpage = 3.4.1
+zope.app.renderer = 3.4.0
+zope.app.rotterdam = 3.4.1
+zope.app.schema = 3.4.0
+zope.app.security = 3.5.2
+zope.app.securitypolicy = 3.4.6
+zope.app.server = 3.4.2
+zope.app.session = 3.5.1
+zope.app.skins = 3.4.0
+zope.app.sqlscript = 3.4.1
+zope.app.testing = 3.4.3
+zope.app.traversing = 3.4.0
+zope.app.tree = 3.4.0
+zope.app.twisted = 3.4.1
+zope.app.undo = 3.4.0
+zope.app.wfmc = 0.1.2
+zope.app.workflow = 3.4.1
+zope.app.wsgi = 3.4.1
+zope.app.xmlrpcintrospection = 3.4.0
+zope.app.zapi = 3.4.0
+zope.app.zcmlfiles = 3.4.3
+zope.app.zopeappgenerations = 3.4.0
+zope.app.zptpage = 3.4.1
+zope.cachedescriptors = 3.4.1
+zope.component = 3.4.0
+zope.configuration = 3.4.0
+zope.contentprovider = 3.4.0
+zope.contenttype = 3.4.0
+zope.copypastemove = 3.4.0
+zope.datetime = 3.4.0
+zope.decorator = 3.4.0
+zope.deferredimport = 3.4.0
+zope.deprecation = 3.4.0
+zope.documenttemplate = 3.4.0
+zope.dottedname = 3.4.2
+zope.dublincore = 3.4.0
+zope.error = 3.5.1
+zope.event = 3.4.0
+zope.exceptions = 3.4.0
+zope.file = 0.3.0
+zope.filerepresentation = 3.4.0
+zope.formlib = 3.4.0
+zope.hookable = 3.4.0
+zope.html = 1.0.1
+zope.i18n = 3.4.0
+zope.i18nmessageid = 3.4.3
+zope.index = 3.4.1
+zope.interface = 3.4.1
+zope.lifecycleevent = 3.4.0
+zope.location = 3.4.0
+zope.mimetype = 0.3.0
+zope.minmax = 1.1.0
+zope.modulealias = 3.4.0
+zope.pagetemplate = 3.4.0
+zope.proxy = 3.4.2
+zope.publisher = 3.4.6
+zope.rdb = 3.4.0
+zope.schema = 3.4.0
+zope.security = 3.4.1
+zope.securitypolicy = 3.4.1
+zope.sendmail = 3.4.0
+zope.sequencesort = 3.4.0
+zope.server = 3.4.3
+zope.session = 3.4.1
+zope.size = 3.4.0
+zope.structuredtext = 3.4.0
+zope.tal = 3.4.1
+zope.tales = 3.4.0
+zope.testbrowser = 3.4.2
+zope.testing = 3.5.6
+zope.testrecorder = 0.3.0
+zope.thread = 3.4
+zope.traversing = 3.4.1
+zope.ucol = 1.0.2
+zope.viewlet = 3.4.2
+zope.wfmc = 3.4.0
+zope.xmlpickle = 3.4.0

Modified: zope.app.publication/tags/3.4.4/setup.py
===================================================================
--- zope.app.publication/tags/3.4.4/setup.py	2009-08-12 23:06:07 UTC (rev 102722)
+++ zope.app.publication/tags/3.4.4/setup.py	2009-08-13 01:22:26 UTC (rev 102723)
@@ -22,7 +22,7 @@
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
 setup(name='zope.app.publication',
-    version = '3.4.3',
+    version = '3.4.4',
     author='Zope Corporation and Contributors',
     author_email='zope3-dev at zope.org',
     description='Zope publication',

Modified: zope.app.publication/tags/3.4.4/src/zope/app/publication/tests/test_zopepublication.py
===================================================================
--- zope.app.publication/tags/3.4.4/src/zope/app/publication/tests/test_zopepublication.py	2009-08-12 23:06:07 UTC (rev 102722)
+++ zope.app.publication/tags/3.4.4/src/zope/app/publication/tests/test_zopepublication.py	2009-08-13 01:22:26 UTC (rev 102723)
@@ -415,7 +415,46 @@
         self.assert_(isinstance(error_info[1], FooError))
         self.assert_(request is self.request)
 
+    def testLogBeforeAbort(self):
+        # If we get an exception, and then (a catastrophe, but one that has
+        # been experienced) transaction.abort fails, we really want to know
+        # what happened before that abort.
+        # (Set up:)
+        zope.component.provideUtility(ErrorReportingUtility())
+        abort = transaction.abort
+        class AbortError(Exception):
+            pass
+        class AnEarlierError(Exception):
+            pass
+        def faux_abort():
+            raise AbortError
+        try:
+            raise AnEarlierError()
+        except AnEarlierError:
+            pass
+        transaction.abort = faux_abort
+        try:
+            # (Test:)
+            try:
+                self.publication.handleException(
+                    self.object, self.request, sys.exc_info(),
+                    retry_allowed=False)
+            except AbortError:
+                pass
+            else:
+                self.fail('Aborting should have failed')
+            # we expect a message in our logging utility
+            error_log = zope.component.getUtility(IErrorReportingUtility)
+            self.assertEqual(len(error_log.exceptions), 1)
+            error_info, request = error_log.exceptions[0]
+            self.assertEqual(error_info[0], AnEarlierError)
+            self.failUnless(isinstance(error_info[1], AnEarlierError))
+            self.failUnless(request is self.request)
+        finally:
+            # (Tear down:)
+            transaction.abort = abort
 
+
 class ZopePublicationTests(BasePublicationTests):
 
     def testGlobalAuth(self):

Modified: zope.app.publication/tags/3.4.4/src/zope/app/publication/zopepublication.py
===================================================================
--- zope.app.publication/tags/3.4.4/src/zope/app/publication/zopepublication.py	2009-08-12 23:06:07 UTC (rev 102722)
+++ zope.app.publication/tags/3.4.4/src/zope/app/publication/zopepublication.py	2009-08-13 01:22:26 UTC (rev 102723)
@@ -248,7 +248,12 @@
     def handleException(self, object, request, exc_info, retry_allowed=True):
         # This transaction had an exception that reached the publisher.
         # It must definitely be aborted.
-        transaction.abort()
+        try:
+            transaction.abort()
+        except:
+            # Hm, a catastrophe.  We might want to know what preceded it.
+            self._logErrorWithErrorReportingUtility(object, request, exc_info)
+            raise
 
         # Reraise Retry exceptions for the publisher to deal with.
         if retry_allowed and isinstance(exc_info[1], Retry):
@@ -268,7 +273,7 @@
         # handling determine whether a retry is allowed or not?
         # Assume not for now.
 
-        # Record the error with the ErrorReportingUtility
+        # Record the error with the ErrorReportingUtility.
         self._logErrorWithErrorReportingUtility(object, request, exc_info)
 
         response = request.response



More information about the Checkins mailing list