[Zope-Checkins]
SVN: Zope/branches/2.10/lib/python/Products/ZCatalog/__init__.py
Removed a warning at Zope startup.
Florent Guillaume
fg at nuxeo.com
Thu Jun 1 07:52:56 EDT 2006
Log message for revision 68432:
Removed a warning at Zope startup.
Changed:
U Zope/branches/2.10/lib/python/Products/ZCatalog/__init__.py
-=-
Modified: Zope/branches/2.10/lib/python/Products/ZCatalog/__init__.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/ZCatalog/__init__.py 2006-06-01 11:50:02 UTC (rev 68431)
+++ Zope/branches/2.10/lib/python/Products/ZCatalog/__init__.py 2006-06-01 11:52:56 UTC (rev 68432)
@@ -15,8 +15,16 @@
import ZCatalog, CatalogAwareness, CatalogPathAwareness
from Products.PluginIndexes.TextIndex import Vocabulary
-from ZClasses import createZClassForBase
+# BBB: ZClasses are deprecated but we don't want the warning to appear here
+import warnings
+warnings.filterwarnings('ignore', message='^ZClasses', append=1)
+try:
+ from ZClasses import createZClassForBase
+finally:
+ del warnings.filters[-1]
+ del __warningregistry__
+
createZClassForBase( ZCatalog.ZCatalog , globals()
, 'ZCatalogBase', 'ZCatalog' )
createZClassForBase( CatalogAwareness.CatalogAware, globals()
More information about the Zope-Checkins
mailing list