[Zope-Checkins]
SVN: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/
import cleanup
Andreas Jung
andreas at andreas-jung.com
Fri Jul 16 01:57:23 EDT 2004
Log message for revision 26565:
import cleanup
Changed:
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/Catalog.py
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/CatalogPathAwareness.py
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalogIndexes.py
U Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/__init__.py
-=-
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/Catalog.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/Catalog.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/Catalog.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -11,27 +11,27 @@
#
##############################################################################
-from Persistence import Persistent
+import types
+import logging
+from bisect import bisect
+from random import randint
+
import Acquisition
import ExtensionClass
-from MultiMapping import MultiMapping
-import Record
from Missing import MV
-import logging
+from Persistence import Persistent
-from Lazy import LazyMap, LazyFilter, LazyCat, LazyValues
-from CatalogBrains import AbstractCatalogBrain, NoBrainer
+import BTrees.Length
from BTrees.IIBTree import intersection, weightedIntersection, IISet
from BTrees.OIBTree import OIBTree
from BTrees.IOBTree import IOBTree
-import BTrees.Length
+from Lazy import LazyMap, LazyCat, LazyValues
+from CatalogBrains import AbstractCatalogBrain, NoBrainer
-import time, sys, types
-from bisect import bisect
-from random import randint
LOG = logging.getLogger('Zope.ZCatalog')
+
try:
from DocumentTemplate.cDocumentTemplate import safe_callable
except ImportError:
@@ -278,7 +278,7 @@
indexes = self.indexes
- if isinstance(index_type, types.StringType):
+ if isinstance(index_type, 'str'):
raise TypeError,"""Catalog addIndex now requires the index type to
be resolved prior to adding; create the proper index in the caller."""
@@ -755,7 +755,7 @@
reverse = 0
if sort_index is not None:
order = self._get_sort_attr("order", args)
- if (isinstance(order, types.StringType) and
+ if (isinstance(order, 'str') and
order.lower() in ('reverse', 'descending')):
reverse = 1
# Perform searches with indexes and sort_index
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/CatalogPathAwareness.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/CatalogPathAwareness.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/CatalogPathAwareness.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -13,7 +13,6 @@
"""ZCatalog Findable class"""
-import urllib
from Globals import DTMLFile
from Acquisition import aq_base
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -26,14 +26,14 @@
"""
def init(ident, max):
- """ Called add the start of the long running process.
+ """ Called at the start of the long running process.
'ident' -- a string identifying the operation
- 'max' -- maximum number of objects to be processed
+ 'max' -- maximum number of objects to be processed (int)
"""
def finish():
- """ Called up terminiation """
+ """ Called up termination """
def report(current, *args, **kw):
""" Called for every iteration.
@@ -59,7 +59,7 @@
self._max = max
self._start = time.time()
self.fp = sys.stdout
- self.output('Process started')
+ self.output('Process started (%d objects to go)' % self._max)
def finish(self):
self.output('Process terminated. Duration: %0.2f seconds' % \
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalog.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -15,6 +15,8 @@
$Id$
"""
+import urllib, time, sys, string,logging
+
from Globals import DTMLFile, MessageDialog
import Globals
@@ -35,8 +37,6 @@
from Products.PluginIndexes.common.PluggableIndex \
import PluggableIndexInterface
from Products.PluginIndexes.TextIndex import Splitter
-import urllib, time, sys
-import string,logging
from IZCatalog import IZCatalog
from ProgressHandler import ZLogHandler
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalogIndexes.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalogIndexes.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ZCatalogIndexes.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -14,21 +14,16 @@
"""$Id$
"""
-from Globals import DTMLFile, InitializeClass
+
+from Acquisition import Implicit
+from Persistence import Persistent
+from Globals import DTMLFile, InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo
-from AccessControl.Permissions import delete_objects, manage_zcatalog_indexes
-import Globals
+from AccessControl.Permissions import manage_zcatalog_indexes
from OFS.Folder import Folder
-from OFS.FindSupport import FindSupport
-from OFS.History import Historical
from OFS.SimpleItem import SimpleItem
-from OFS.ObjectManager import ObjectManager, IFAwareObjectManager
+from OFS.ObjectManager import IFAwareObjectManager
-import os, sys, time
-
-from Acquisition import Implicit
-from Persistence import Persistent
-
from Products.PluginIndexes.common.PluggableIndex import PluggableIndexInterface
_marker = []
Modified: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/__init__.py
===================================================================
--- Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/__init__.py 2004-07-16 05:46:47 UTC (rev 26564)
+++ Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/__init__.py 2004-07-16 05:57:23 UTC (rev 26565)
@@ -13,7 +13,7 @@
"""ZCatalog product"""
-import ZCatalog, Catalog, CatalogAwareness, CatalogPathAwareness, ZClasses
+import ZCatalog, CatalogAwareness, CatalogPathAwareness
from Products.PluginIndexes.TextIndex import Vocabulary
from ZClasses import createZClassForBase
More information about the Zope-Checkins
mailing list