Commit d250e0d0 authored by Hanno Schlichting's avatar Hanno Schlichting

Removed fallback code for old `ZCatalog.catalog_object` function signatures...

Removed fallback code for old `ZCatalog.catalog_object` function signatures from `Products.ZCatalog.ZCatalog.reindexIndex`.
parent 177b6d7e
...@@ -19,6 +19,12 @@ Bugs Fixed ...@@ -19,6 +19,12 @@ Bugs Fixed
attribute in the browser:view directive. This attribute has never been attribute in the browser:view directive. This attribute has never been
supported in Zope 2. supported in Zope 2.
Restructuring
+++++++++++++
- Removed fallback code for old `ZCatalog.catalog_object` function signatures
from `Products.ZCatalog.ZCatalog.reindexIndex`.
Features Added Features Added
++++++++++++++ ++++++++++++++
......
...@@ -20,7 +20,6 @@ import sys ...@@ -20,7 +20,6 @@ import sys
import string import string
import time import time
import urllib import urllib
from warnings import warn
from AccessControl.class_init import InitializeClass from AccessControl.class_init import InitializeClass
from AccessControl.Permission import name_trans from AccessControl.Permission import name_trans
...@@ -466,26 +465,8 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -466,26 +465,8 @@ class ZCatalog(Folder, Persistent, Implicit):
else: else:
# don't update metadata when only reindexing a single # don't update metadata when only reindexing a single
# index via the UI # index via the UI
try:
self.catalog_object(obj, p, idxs=name, self.catalog_object(obj, p, idxs=name,
update_metadata=0, pghandler=pghandler) update_metadata=0, pghandler=pghandler)
except TypeError:
# Fall back to Zope 2.6.2 interface. This is necessary for
# products like CMF 1.4.2 and earlier that subclass from
# ZCatalog and don't support the update_metadata argument.
# May be removed some day.
warn('catalog_object interface of %s not up to date'
% self.__class__.__name__,
DeprecationWarning)
try:
self.catalog_object(obj, p, idxs=name, pghandler=pghandler)
except TypeError:
# Fall back to pre-Zope 2.8 interface where there is no
# 'pghandler' argument.
warn('catalog_object interface of %s not up to date'
% self.__class__.__name__,
DeprecationWarning)
self.catalog_object(obj, p, idxs=name)
if pghandler: if pghandler:
pghandler.finish() pghandler.finish()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment