Re: [Zope-Checkins] SVN: Zope/branches/2.10/ Backported discouraged warning for manage_* events from trunk

2007-11-10 Thread Chris Withers

Hanno Schlichting wrote:

Log message for revision 81167:
  Backported discouraged warning for manage_* events from trunk


If this stuff isn't going away, warnings shouldn't be omitted at all, 
regardless of the wording...


If these methods are staying around, by all means put comments in the 
code about what it stylistically correct, but actually issuing a 
warning, regardless of the wording, means something *needs* to be 
changed which simply isn't the case here...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-Checkins] SVN: Zope/trunk/ Made Helpsys.HelpSys internal ZCatalog creation lazy, so it isn't created unless first accessed.

2007-11-10 Thread Chris Withers

Hanno Schlichting wrote:

Log message for revision 81408:
  Made Helpsys.HelpSys internal ZCatalog creation lazy, so it isn't created 
unless first accessed.


This seems a little pointless as either:

- the catalog will get created as soon as any help is indexed, which 
will be always


- the first time you access the help system, you'll have to wait while 
all the help is indexed


Neither are great. Have you tested that this change actually makes a 
difference?


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ Revert c81408 HelpSys changes, it didn't make much of a difference. Making the whole help system optional would be a better approach.

2007-11-10 Thread Hanno Schlichting
Log message for revision 81697:
  Revert c81408 HelpSys changes, it didn't make much of a difference. Making 
the whole help system optional would be a better approach.
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/HelpSys/HelpSys.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2007-11-10 11:28:15 UTC (rev 81696)
+++ Zope/trunk/doc/CHANGES.txt  2007-11-10 11:38:21 UTC (rev 81697)
@@ -9,9 +9,6 @@
 
 Restructuring
 
-  - Made Helpsys.HelpSys internal ZCatalog creation lazy, so it isn't
-created unless first accessed.
-
   - Turned deprecation warnings for manage_afterAdd, manage_beforeDelete
 and manage_afterClone methods into discouraged warnings. These methods
 will not be removed in Zope 2.11, but stay for the foreseeable future.

Modified: Zope/trunk/lib/python/HelpSys/HelpSys.py
===
--- Zope/trunk/lib/python/HelpSys/HelpSys.py2007-11-10 11:28:15 UTC (rev 
81696)
+++ Zope/trunk/lib/python/HelpSys/HelpSys.py2007-11-10 11:38:21 UTC (rev 
81697)
@@ -219,27 +219,21 @@
 def __init__(self, id='Help', title=''):
 self.id=id
 self.title=title
-self._catalog = None
+c=self.catalog=ZCatalog('catalog')
+# clear catalog
+for index in c.indexes():
+c.delIndex(index)
+for col in c.schema():
+c.delColumn(col)
+c.addIndex('SearchableText', 'TextIndex')
+c.addIndex('categories', 'KeywordIndex')
+c.addIndex('permissions', 'KeywordIndex')
+c.addColumn('categories')
+c.addColumn('permissions')
+c.addColumn('title_or_id')
+c.addColumn('url')
+c.addColumn('id')
 
-@property
-def catalog(self):
-if self._catalog is None:
-c=self._catalog=ZCatalog('catalog')
-# clear catalog
-for index in c.indexes():
-c.delIndex(index)
-for col in c.schema():
-c.delColumn(col)
-c.addIndex('SearchableText', 'TextIndex')
-c.addIndex('categories', 'KeywordIndex')
-c.addIndex('permissions', 'KeywordIndex')
-c.addColumn('categories')
-c.addColumn('permissions')
-c.addColumn('title_or_id')
-c.addColumn('url')
-c.addColumn('id')
-return self._catalog
-
 security.declareProtected(add_documents_images_and_files, 'addTopicForm')
 addTopicForm=DTMLFile('dtml/addTopic', globals())
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins