[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/Transience/Transience.py remove unused import.
Log message for revision 40465: remove unused import. Changed: U Zope/trunk/lib/python/Products/Transience/Transience.py -=- Modified: Zope/trunk/lib/python/Products/Transience/Transience.py === --- Zope/trunk/lib/python/Products/Transience/Transience.py 2005-12-02 10:36:37 UTC (rev 40464) +++ Zope/trunk/lib/python/Products/Transience/Transience.py 2005-12-02 12:10:29 UTC (rev 40465) @@ -36,7 +36,6 @@ from Persistence import Persistent from OFS.SimpleItem import SimpleItem -from ZPublisher.Publish import Retry from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl.SecurityManagement import newSecurityManager, \ setSecurityManager ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/ZServer/ moved FCGI deprecation warning into FCGIServerFactory
Log message for revision 40467: moved FCGI deprecation warning into FCGIServerFactory Changed: U Zope/trunk/lib/python/ZServer/FCGIServer.py U Zope/trunk/lib/python/ZServer/datatypes.py -=- Modified: Zope/trunk/lib/python/ZServer/FCGIServer.py === --- Zope/trunk/lib/python/ZServer/FCGIServer.py 2005-12-02 13:29:46 UTC (rev 40466) +++ Zope/trunk/lib/python/ZServer/FCGIServer.py 2005-12-02 13:35:48 UTC (rev 40467) @@ -48,10 +48,6 @@ import thread from types import StringTypes -import warnings -warnings.warn(Using FastCGI is deprecated. You should use mod_proxy + - to run Zope with Apache, DeprecationWarning) - tz_for_log = compute_timezone_for_log() #-- Modified: Zope/trunk/lib/python/ZServer/datatypes.py === --- Zope/trunk/lib/python/ZServer/datatypes.py 2005-12-02 13:29:46 UTC (rev 40466) +++ Zope/trunk/lib/python/ZServer/datatypes.py 2005-12-02 13:35:48 UTC (rev 40467) @@ -132,6 +132,12 @@ class FCGIServerFactory(ServerFactory): def __init__(self, section): + +import warnings +warnings.warn(Using FastCGI is deprecated. You should use mod_proxy + + to run Zope with Apache, DeprecationWarning) + + import socket if section.address.family == socket.AF_INET: address = section.address.address ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/SimpleItem.py - change to use python logging module
Log message for revision 40468: - change to use python logging module - log at error when standard_error_message can't be rendered - give more useful info about errors rendering standard_error_message to the browser. Changed: U Zope/trunk/lib/python/OFS/SimpleItem.py -=- Modified: Zope/trunk/lib/python/OFS/SimpleItem.py === --- Zope/trunk/lib/python/OFS/SimpleItem.py 2005-12-02 13:35:48 UTC (rev 40467) +++ Zope/trunk/lib/python/OFS/SimpleItem.py 2005-12-02 13:45:58 UTC (rev 40468) @@ -32,12 +32,12 @@ from AccessControl.ZopeSecurityPolicy import getRoles from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire from ComputedAttribute import ComputedAttribute +from DocumentTemplate.html_quote import html_quote from DocumentTemplate.ustr import ustr from ExtensionClass import Base from webdav.Resource import Resource from zExceptions import Redirect from zExceptions.ExceptionFormatter import format_exception -from zLOG import LOG, BLATHER from zope.interface import implements import ZDOM @@ -49,6 +49,8 @@ HTML=Globals.HTML +import logging +logger = logging.getLogger() class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable, ZDOM.Element, @@ -226,17 +228,21 @@ else: v = HTML.__call__(s, client, REQUEST, **kwargs) except: -LOG('OFS', BLATHER, +logger.error( 'Exception while rendering an error message', -error=sys.exc_info()) +exc_info=True +) try: strv = str(error_value) except: -strv = ('unprintable %s object' % +strv = ('unprintable %s object' % str(type(error_value).__name__)) v = strv + ( - (Also, an error occurred while attempting -to render the standard error message.)) +( (Also, the following error occurred while attempting + to render the standard error message, please see the + event log for full details: %s))%( +html_quote(sys.exc_info()[1]), +)) raise error_type, v, tb finally: if hasattr(self, '_v_eek'): del self._v_eek ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/ deprecated FastCGI
Log message for revision 40469: deprecated FastCGI Changed: U Zope/branches/2.9/doc/CHANGES.txt U Zope/branches/2.9/doc/WEBSERVER.txt U Zope/branches/2.9/lib/python/ZServer/datatypes.py -=- Modified: Zope/branches/2.9/doc/CHANGES.txt === --- Zope/branches/2.9/doc/CHANGES.txt 2005-12-02 13:45:58 UTC (rev 40468) +++ Zope/branches/2.9/doc/CHANGES.txt 2005-12-02 13:49:55 UTC (rev 40469) @@ -26,6 +26,8 @@ Features added + - Using FastCGI is officially deprecated + - Improved logging of ConflictErrors. Now a log is made at level BLATHER with traceback for any conflict retried. In addition, a log is made at level ERROR for a conflict that can't be retried Modified: Zope/branches/2.9/doc/WEBSERVER.txt === --- Zope/branches/2.9/doc/WEBSERVER.txt 2005-12-02 13:45:58 UTC (rev 40468) +++ Zope/branches/2.9/doc/WEBSERVER.txt 2005-12-02 13:49:55 UTC (rev 40469) @@ -110,6 +110,8 @@ FastCGI + FastCGI is deprecated and should not be used anymore. + FastCGI is relatively easy to set up if you have installed an Apache module before. If you haven't, don't worry, it isn't difficult. It comes with straightforward instructions. You will need to download Modified: Zope/branches/2.9/lib/python/ZServer/datatypes.py === --- Zope/branches/2.9/lib/python/ZServer/datatypes.py 2005-12-02 13:45:58 UTC (rev 40468) +++ Zope/branches/2.9/lib/python/ZServer/datatypes.py 2005-12-02 13:49:55 UTC (rev 40469) @@ -132,6 +132,11 @@ class FCGIServerFactory(ServerFactory): def __init__(self, section): + +import warnings +warnings.warn(Using FastCGI is deprecated. You should use mod_proxy + to run Zope with Apache, DeprecationWarning) + import socket if section.address.family == socket.AF_INET: address = section.address.address ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/Z further changes to ConflictError logging:
Log message for revision 40472: further changes to ConflictError logging: - all conflict errors are counted and logged at info, as they were before Florent's change - logging makes it clear where the conflict has been resolved and where it hasn't - errors seen by the user are rendered with standard_error_message and are sent to the error_log which will likely copy them to the event log, depending on the users setup. - also checking in a functional test for generating write conflict errors. (I'll be committing to CHANGES.TXT shortly, I just wanted to keep the merges simpler) Changed: A Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py U Zope/trunk/lib/python/Zope2/App/startup.py -=- Added: Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py === --- Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py 2005-12-02 14:34:07 UTC (rev 40471) +++ Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py 2005-12-02 14:35:08 UTC (rev 40472) @@ -0,0 +1,91 @@ +## This script requires: +## - python2.4 +## - Zope 3's zope.testbrowser package: +## http://www.zope.org/Members/benji_york/ZopeTestbrowser-0.9.0.tgz +## +## The just run: +## $python2.4 generate_conflicts.py +import base64 +import string +import threading +import urllib2 + +from zope.testbrowser.browser import Browser + +# create our browser +class AuthBrowser(Browser): + +def addBasicAuth(self,username,password): +self.addHeader( +'Authorization', +'Basic '+base64.encodestring(username+':'+password).strip() +) + +def open(self,uri,include_server=True): +if include_server: +uri = server+uri +return Browser.open(self,uri) + +browser = AuthBrowser() + +# constants +server = 'http://localhost:8080' +# the following user must be able to view the management screens +# and create file objects +username = 'username' +password = 'password' +browser.addBasicAuth(username,password) +threads = 10 +filename = 'conflict.txt' +filesize = 1 +hits = 5 + +# delete the file if it's already there +browser.open('/manage_main') +if filename in [c.optionValue +for c in browser.getControl(name='ids:list').controls]: +browser.open('/manage_delObjects?ids:list='+filename) + +# create it +browser.open('/manage_addFile?id='+filename) + +# edit it, hopefully causing conflicts +data = 'X'*filesize +class EditThread(threading.Thread): + +def __init__(self,i): +self.conflicts = 0 +self.browser = AuthBrowser() +self.browser.handleErrors = False +self.browser.addBasicAuth(username,password) +threading.Thread.__init__(self,name=str(i)) + +def run(self): +for i in range(1,hits+1): +self.browser.open('/conflict.txt/manage_main') +self.browser.getControl(name='title').value='Test Title' +self.browser.getControl(name='filedata:text').value = data +try: +self.browser.getControl(name='manage_edit:method').click() +except urllib2.HTTPError,e: +# print e.read() +self.conflicts += 1 +print Thread %s - CONFLICT % self.getName() +else: +print Thread %s - EDIT % self.getName() + +thread_objects = [] +for i in range(1,threads+1): +t = EditThread(i) +thread_objects.append(t) +t.start() +for t in thread_objects: +t.join() +total = 0 +print +for t in thread_objects: +print Thread %s - %i conflicts seen % (t.getName(),t.conflicts) +total += t.conflicts +print +print %i conflicts seen by browsers % total + Property changes on: Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py ___ Name: svn:eol-style + native Modified: Zope/trunk/lib/python/Zope2/App/startup.py === --- Zope/trunk/lib/python/Zope2/App/startup.py 2005-12-02 14:34:07 UTC (rev 40471) +++ Zope/trunk/lib/python/Zope2/App/startup.py 2005-12-02 14:35:08 UTC (rev 40472) @@ -18,9 +18,9 @@ from AccessControl.SecurityManagement import noSecurityManager from Acquisition import aq_acquire from App.config import getConfiguration +from time import asctime from types import StringType, ListType from zExceptions import Unauthorized -from zLOG import LOG, ERROR, WARNING, INFO, BLATHER, log_time from ZODB.POSException import ConflictError import transaction import AccessControl.User @@ -28,6 +28,7 @@ import ExtensionClass import Globals import imp +import logging import OFS.Application import os import sys @@ -103,7 +104,7 @@ noSecurityManager() global startup_time -startup_time = log_time() +startup_time = asctime() Zope2.zpublisher_transactions_manager = TransactionsManager()
[Zope-Checkins] SVN: Zope/trunk/lib/python/Zope2/App/startup.py *sigh* failed to correctly merge my own patch.
Log message for revision 40475: *sigh* failed to correctly merge my own patch. Changed: U Zope/trunk/lib/python/Zope2/App/startup.py -=- Modified: Zope/trunk/lib/python/Zope2/App/startup.py === --- Zope/trunk/lib/python/Zope2/App/startup.py 2005-12-02 14:45:53 UTC (rev 40474) +++ Zope/trunk/lib/python/Zope2/App/startup.py 2005-12-02 15:10:44 UTC (rev 40475) @@ -221,6 +221,7 @@ finally: traceback=None +ac_logger = logging.getLogger('event.AccessControl') class TransactionsManager: def begin(self, @@ -237,7 +238,7 @@ def recordMetaData(self, object, request, # Optimize global var lookups: hasattr=hasattr, getattr=getattr, - LOG=LOG, WARNING=WARNING, + logger=ac_logger, ): request_get = request.get if hasattr(object, 'getPhysicalPath'): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/ Merge error reporting changes from trunk:
Log message for revision 40476: Merge error reporting changes from trunk: - remove unused import. - change SimpleItem.py to use python logging module - log at error when standard_error_message can't be rendered - give more useful info about errors rendering standard_error_message to the browser. - all conflict errors are counted and logged at info - logging makes it clear where the conflict has been resolved and where it hasn't - errors seen by the user are rendered with standard_error_message and are sent to the error_log which will likely copy them to the event log, depending on the users setup. - also checking in a functional test for generating write conflict errors. (I'll be committing to CHANGES.TXT shortly, I just wanted to keep the merges simpler) Changed: U Zope/branches/Zope-2_8-branch/lib/python/OFS/SimpleItem.py U Zope/branches/Zope-2_8-branch/lib/python/Products/Transience/Transience.py A Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/tests/generate_conflicts.py U Zope/branches/Zope-2_8-branch/lib/python/Zope2/App/startup.py -=- Modified: Zope/branches/Zope-2_8-branch/lib/python/OFS/SimpleItem.py === --- Zope/branches/Zope-2_8-branch/lib/python/OFS/SimpleItem.py 2005-12-02 15:10:44 UTC (rev 40475) +++ Zope/branches/Zope-2_8-branch/lib/python/OFS/SimpleItem.py 2005-12-02 15:44:31 UTC (rev 40476) @@ -30,10 +30,10 @@ from AccessControl import getSecurityManager, Unauthorized from AccessControl.ZopeSecurityPolicy import getRoles from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire +from DocumentTemplate.html_quote import html_quote from DocumentTemplate.ustr import ustr from zExceptions.ExceptionFormatter import format_exception from zExceptions import Redirect -from zLOG import LOG, BLATHER from CopySupport import CopySource from Traversable import Traversable @@ -41,6 +41,8 @@ HTML=Globals.HTML +import logging +logger = logging.getLogger() class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable, ZDOM.Element, @@ -210,17 +212,21 @@ else: v = HTML.__call__(s, client, REQUEST, **kwargs) except: -LOG('OFS', BLATHER, +logger.error( 'Exception while rendering an error message', -error=sys.exc_info()) +exc_info=True +) try: strv = str(error_value) except: strv = ('unprintable %s object' % str(type(error_value).__name__)) v = strv + ( - (Also, an error occurred while attempting -to render the standard error message.)) +( (Also, the following error occurred while attempting + to render the standard error message, please see the + event log for full details: %s))%( +html_quote(sys.exc_info()[1]), +)) raise error_type, v, tb finally: if hasattr(self, '_v_eek'): del self._v_eek Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/Transience/Transience.py === --- Zope/branches/Zope-2_8-branch/lib/python/Products/Transience/Transience.py 2005-12-02 15:10:44 UTC (rev 40475) +++ Zope/branches/Zope-2_8-branch/lib/python/Products/Transience/Transience.py 2005-12-02 15:44:31 UTC (rev 40476) @@ -36,7 +36,6 @@ from Persistence import Persistent from OFS.SimpleItem import SimpleItem -from ZPublisher.Publish import Retry from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl.SecurityManagement import newSecurityManager, \ setSecurityManager Copied: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/tests/generate_conflicts.py (from rev 40472, Zope/trunk/lib/python/ZPublisher/tests/generate_conflicts.py) Property changes on: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/tests/generate_conflicts.py ___ Name: svn:eol-style + native Modified: Zope/branches/Zope-2_8-branch/lib/python/Zope2/App/startup.py === --- Zope/branches/Zope-2_8-branch/lib/python/Zope2/App/startup.py 2005-12-02 15:10:44 UTC (rev 40475) +++ Zope/branches/Zope-2_8-branch/lib/python/Zope2/App/startup.py 2005-12-02 15:44:31 UTC (rev 40476) @@ -18,9 +18,9 @@ from AccessControl.SecurityManagement import noSecurityManager from Acquisition import aq_acquire from App.config import getConfiguration +from time import asctime from types import StringType, ListType from zExceptions import Unauthorized -from zLOG import LOG, WARNING, INFO, BLATHER,
[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/ - remove unused import.
Log message for revision 40478: - remove unused import. - change SimpleItem.py to use python logging module - log at error when standard_error_message can't be rendered - give more useful info about errors rendering standard_error_message to the browser. - all conflict errors are counted and logged at info - logging makes it clear where the conflict has been resolved and where it hasn't - errors seen by the user are rendered with standard_error_message and are sent to the error_log which will likely copy them to the event log, depending on the users setup. - also checking in a functional test for generating write conflict errors. (I'll be committing to CHANGES.TXT shortly, I just wanted to keep the merges simpler) Changed: U Zope/branches/2.9/lib/python/OFS/SimpleItem.py U Zope/branches/2.9/lib/python/Products/Transience/Transience.py A Zope/branches/2.9/lib/python/ZPublisher/tests/generate_conflicts.py U Zope/branches/2.9/lib/python/Zope2/App/startup.py -=- Modified: Zope/branches/2.9/lib/python/OFS/SimpleItem.py === --- Zope/branches/2.9/lib/python/OFS/SimpleItem.py 2005-12-02 15:46:29 UTC (rev 40477) +++ Zope/branches/2.9/lib/python/OFS/SimpleItem.py 2005-12-02 15:52:43 UTC (rev 40478) @@ -29,12 +29,12 @@ from AccessControl.ZopeSecurityPolicy import getRoles from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire from ComputedAttribute import ComputedAttribute +from DocumentTemplate.html_quote import html_quote from DocumentTemplate.ustr import ustr from ExtensionClass import Base from webdav.Resource import Resource from zExceptions import Redirect from zExceptions.ExceptionFormatter import format_exception -from zLOG import LOG, BLATHER from zope.interface import implements import ZDOM @@ -46,6 +46,8 @@ HTML=Globals.HTML +import logging +logger = logging.getLogger() class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable, ZDOM.Element, @@ -222,17 +224,21 @@ else: v = HTML.__call__(s, client, REQUEST, **kwargs) except: -LOG('OFS', BLATHER, +logger.error( 'Exception while rendering an error message', -error=sys.exc_info()) +exc_info=True +) try: strv = str(error_value) except: strv = ('unprintable %s object' % str(type(error_value).__name__)) v = strv + ( - (Also, an error occurred while attempting -to render the standard error message.)) +( (Also, the following error occurred while attempting + to render the standard error message, please see the + event log for full details: %s))%( +html_quote(sys.exc_info()[1]), +)) raise error_type, v, tb finally: if hasattr(self, '_v_eek'): del self._v_eek Modified: Zope/branches/2.9/lib/python/Products/Transience/Transience.py === --- Zope/branches/2.9/lib/python/Products/Transience/Transience.py 2005-12-02 15:46:29 UTC (rev 40477) +++ Zope/branches/2.9/lib/python/Products/Transience/Transience.py 2005-12-02 15:52:43 UTC (rev 40478) @@ -36,7 +36,6 @@ from Persistence import Persistent from OFS.SimpleItem import SimpleItem -from ZPublisher.Publish import Retry from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl.SecurityManagement import newSecurityManager, \ setSecurityManager Copied: Zope/branches/2.9/lib/python/ZPublisher/tests/generate_conflicts.py (from rev 40476, Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/tests/generate_conflicts.py) Property changes on: Zope/branches/2.9/lib/python/ZPublisher/tests/generate_conflicts.py ___ Name: svn:eol-style + native Modified: Zope/branches/2.9/lib/python/Zope2/App/startup.py === --- Zope/branches/2.9/lib/python/Zope2/App/startup.py 2005-12-02 15:46:29 UTC (rev 40477) +++ Zope/branches/2.9/lib/python/Zope2/App/startup.py 2005-12-02 15:52:43 UTC (rev 40478) @@ -18,9 +18,9 @@ from AccessControl.SecurityManagement import noSecurityManager from Acquisition import aq_acquire from App.config import getConfiguration +from time import asctime from types import StringType, ListType from zExceptions import Unauthorized -from zLOG import LOG, ERROR, WARNING, INFO, BLATHER, log_time from ZODB.POSException import ConflictError import transaction import AccessControl.User @@ -28,6 +28,7 @@ import
[Zope-Checkins] SVN: Zope/branches/2.9/doc/CHANGES.txt Note changes to ConflictError logging.
Log message for revision 40479: Note changes to ConflictError logging. Changed: U Zope/branches/2.9/doc/CHANGES.txt -=- Modified: Zope/branches/2.9/doc/CHANGES.txt === --- Zope/branches/2.9/doc/CHANGES.txt 2005-12-02 15:52:43 UTC (rev 40478) +++ Zope/branches/2.9/doc/CHANGES.txt 2005-12-02 15:54:13 UTC (rev 40479) @@ -28,11 +28,12 @@ - Using FastCGI is officially deprecated - - Improved logging of ConflictErrors. Now a log is made at level -BLATHER with traceback for any conflict retried. In addition, a -log is made at level ERROR for a conflict that can't be retried -anymore and is returned to the browser as an error. Nothing is -logged anymore at level INFO. + - Improved logging of ConflictErrors. All conflict errors are +logged at INFO, with counts of how many occurred and how many +were resolved. Tracebacks for all conflicts are logged a DEBUG +level, although these won't help anyone much. If a conflict +error is unresolved, it will now bubble up to error_log and +standard_error_message. - Fixed unclear security declarations. Warn when an attempt is made to have a security declaration on a nonexistent method. ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py continue whack-a-mole'ing useless pagetemplate errors.
Log message for revision 40480: continue whack-a-mole'ing useless pagetemplate errors. Changed: U Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py -=- Modified: Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py === --- Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 15:54:13 UTC (rev 40479) +++ Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 15:58:14 UTC (rev 40480) @@ -131,7 +131,11 @@ self._cook() if self._v_errors: __traceback_supplement__ = (PageTemplateTracebackSupplement, self) -raise PTRuntimeError, 'Page Template %s has errors.' % self.id +raise PTRuntimeError, ( +'Page Template %s has errors: %s' % ( +self.id, +self._v_errors +)) return self._v_macros def pt_source_file(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Products/PageTemplates/PageTemplate.py continue whack-a-mole'ing useless pagetemplate errors.
Log message for revision 40481: continue whack-a-mole'ing useless pagetemplate errors. Changed: U Zope/branches/2.9/lib/python/Products/PageTemplates/PageTemplate.py -=- Modified: Zope/branches/2.9/lib/python/Products/PageTemplates/PageTemplate.py === --- Zope/branches/2.9/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 15:58:14 UTC (rev 40480) +++ Zope/branches/2.9/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 16:24:21 UTC (rev 40481) @@ -131,7 +131,11 @@ self._cook() if self._v_errors: __traceback_supplement__ = (PageTemplateTracebackSupplement, self) -raise PTRuntimeError, 'Page Template %s has errors.' % self.id +raise PTRuntimeError, ( +'Page Template %s has errors: %s' % ( +self.id, +self._v_errors +)) return self._v_macros def pt_source_file(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/Products/PageTemplates/PageTemplate.py continue whack-a-mole'ing useless pagetemplate errors.
Log message for revision 40482: continue whack-a-mole'ing useless pagetemplate errors. Changed: U Zope/branches/Zope-2_8-branch/lib/python/Products/PageTemplates/PageTemplate.py -=- Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/PageTemplates/PageTemplate.py === --- Zope/branches/Zope-2_8-branch/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 16:24:21 UTC (rev 40481) +++ Zope/branches/Zope-2_8-branch/lib/python/Products/PageTemplates/PageTemplate.py 2005-12-02 16:25:25 UTC (rev 40482) @@ -131,7 +131,11 @@ self._cook() if self._v_errors: __traceback_supplement__ = (PageTemplateTracebackSupplement, self) -raise PTRuntimeError, 'Page Template %s has errors.' % self.id +raise PTRuntimeError, ( +'Page Template %s has errors: %s' % ( +self.id, +self._v_errors +)) return self._v_macros def pt_source_file(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Made 'zopectl test' work for software homes which do not have an inplace build.
Log message for revision 40484: Made 'zopectl test' work for software homes which do not have an inplace build. It used to require that test.py be in $ZOPE_HOME/bin/; now it will use $ZOPE_HOME as a fallback. Changed: U Zope/branches/Zope-2_8-branch/doc/CHANGES.txt U Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/zopectl.py -=- Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt === --- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2005-12-02 16:35:58 UTC (rev 40483) +++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2005-12-02 16:41:32 UTC (rev 40484) @@ -58,6 +58,10 @@ Other + - Made 'zopectl test' work for software homes which do not have +an inplace build (it used to require that test.py be in +$ZOPE_HOME/bin/; now it will use $ZOPE_HOME as a fallback). + - Improved logging of ConflictErrors. All conflict errors are logged at INFO, with counts of how many occurred and how many were resolved. Tracebacks for all conflicts are logged a DEBUG Modified: Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/zopectl.py === --- Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:35:58 UTC (rev 40483) +++ Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:41:32 UTC (rev 40484) @@ -238,6 +238,8 @@ return script = os.path.join(zope_home, 'bin', 'test.py') +if not os.path.exists(script): +script = os.path.join(zope_home, 'test.py') # no inplace build! assert os.path.exists(script) # If --libdir is not supplied, use $INSTANCE_HOME/Products ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py Forward-port fix for non-installed software home from 2.8 branch.
Log message for revision 40486: Forward-port fix for non-installed software home from 2.8 branch. Changed: U Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py -=- Modified: Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py === --- Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:44:46 UTC (rev 40485) +++ Zope/branches/2.9/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:46:27 UTC (rev 40486) @@ -238,6 +238,8 @@ return script = os.path.join(zope_home, 'bin', 'test.py') +if not os.path.exists(script): +script = os.path.join(zope_home, 'test.py') # no inplace build! assert os.path.exists(script) # Supply our config file by default. ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/Zope2/Startup/zopectl.py Forward-port fix for non-installed software home from 2.8 branch.
Log message for revision 40488: Forward-port fix for non-installed software home from 2.8 branch. Changed: U Zope/trunk/lib/python/Zope2/Startup/zopectl.py -=- Modified: Zope/trunk/lib/python/Zope2/Startup/zopectl.py === --- Zope/trunk/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:46:40 UTC (rev 40487) +++ Zope/trunk/lib/python/Zope2/Startup/zopectl.py 2005-12-02 16:47:12 UTC (rev 40488) @@ -238,6 +238,8 @@ return script = os.path.join(zope_home, 'bin', 'test.py') +if not os.path.exists(script): +script = os.path.join(zope_home, 'test.py') # no inplace build! assert os.path.exists(script) # Supply our config file by default. ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PythonScripts/module_access_examples.py Removed some unused imports.
Log message for revision 40494: Removed some unused imports. Changed: U Zope/trunk/lib/python/Products/PythonScripts/module_access_examples.py -=- Modified: Zope/trunk/lib/python/Products/PythonScripts/module_access_examples.py === --- Zope/trunk/lib/python/Products/PythonScripts/module_access_examples.py 2005-12-02 17:30:34 UTC (rev 40493) +++ Zope/trunk/lib/python/Products/PythonScripts/module_access_examples.py 2005-12-02 17:42:58 UTC (rev 40494) @@ -33,8 +33,7 @@ ''' from AccessControl import allow_module, allow_class, allow_type -from AccessControl import ModuleSecurityInfo, ClassSecurityInfo -from Globals import InitializeClass +from AccessControl import ModuleSecurityInfo # These modules are pretty safe ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins