[Checkins] SVN: Products.GenericSetup/trunk/Products/GenericSetup/ Made export / import features for old-school TextIndex conditional.
Tres Seaver
tseaver at palladion.com
Wed Sep 23 10:48:03 EDT 2009
Log message for revision 104450:
Made export / import features for old-school TextIndex conditional.
- TextIndex was removed in Zope 2.12.
Changed:
U Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
U Products.GenericSetup/trunk/Products/GenericSetup/PluginIndexes/exportimport.py
-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt 2009-09-23 11:02:05 UTC (rev 104449)
+++ Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt 2009-09-23 14:48:03 UTC (rev 104450)
@@ -4,6 +4,9 @@
GenericSetup 1.5.0 (unreleased)
-------------------------------
+- Made export / import features for old-school TextIndex (removed in Zope 2.12)
+ conditional.
+
- Added support for import / export of subscribers from component registry.
- Adapter removal.
Modified: Products.GenericSetup/trunk/Products/GenericSetup/PluginIndexes/exportimport.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/PluginIndexes/exportimport.py 2009-09-23 11:02:05 UTC (rev 104449)
+++ Products.GenericSetup/trunk/Products/GenericSetup/PluginIndexes/exportimport.py 2009-09-23 14:48:03 UTC (rev 104450)
@@ -135,42 +135,42 @@
node = property(_exportNode, lambda self, val: None)
-# BBB: for Zope < 2.12
-class VocabularyNodeAdapter(NodeAdapterBase):
+if IVocabulary is not None: # BBB: for Zope < 2.12
+ class VocabularyNodeAdapter(NodeAdapterBase):
- """Node im- and exporter for Vocabulary.
- """
-
- adapts(IVocabulary, ISetupEnviron)
-
- def _exportNode(self):
- """Export the object as a DOM node.
+ """Node im- and exporter for Vocabulary.
"""
- node = self._getObjectNode('object')
- node.setAttribute('deprecated', 'True')
- return node
- node = property(_exportNode, lambda self, val: None)
+ adapts(IVocabulary, ISetupEnviron)
+ def _exportNode(self):
+ """Export the object as a DOM node.
+ """
+ node = self._getObjectNode('object')
+ node.setAttribute('deprecated', 'True')
+ return node
-# BBB: for Zope < 2.12
-class TextIndexNodeAdapter(NodeAdapterBase):
+ node = property(_exportNode, lambda self, val: None)
- """Node im- and exporter for TextIndex.
- """
- adapts(ITextIndex, ISetupEnviron)
+if ITextIndex is not None:# BBB: for Zope < 2.12
+ class TextIndexNodeAdapter(NodeAdapterBase):
- def _exportNode(self):
- """Export the object as a DOM node.
+ """Node im- and exporter for TextIndex.
"""
- node = self._getObjectNode('index')
- node.setAttribute('deprecated', 'True')
- return node
- node = property(_exportNode, lambda self, val: None)
+ adapts(ITextIndex, ISetupEnviron)
+ def _exportNode(self):
+ """Export the object as a DOM node.
+ """
+ node = self._getObjectNode('index')
+ node.setAttribute('deprecated', 'True')
+ return node
+ node = property(_exportNode, lambda self, val: None)
+
+
class FilteredSetNodeAdapter(NodeAdapterBase):
"""Node im- and exporter for FilteredSet.
More information about the checkins
mailing list