[Zope-dev] Re: CVS: Zope/lib/python/Products/PluginIndexes/common -
util.py:1.10.68.2
Tres Seaver
tseaver at zope.com
Wed Jan 7 11:03:18 EST 2004
Andreas Jung wrote:
> Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/common
> In directory cvs.zope.org:/tmp/cvs-serv8545/lib/python/Products/PluginIndexes/common
>
> Modified Files:
> Tag: Zope-2_7-branch
> util.py
> Log Message:
> - Using "_usage" parameters in a ZCatalog query is deprecated and
> logged as DeprecationWarning.
>
>
> === Zope/lib/python/Products/PluginIndexes/common/util.py 1.10.68.1 => 1.10.68.2 ===
> --- Zope/lib/python/Products/PluginIndexes/common/util.py:1.10.68.1 Mon Sep 29 08:02:02 2003
> +++ Zope/lib/python/Products/PluginIndexes/common/util.py Tue Jan 6 07:57:13 2004
> @@ -15,6 +15,7 @@
>
>
> import re
> +from warnings import warn
> from types import StringType,ListType,TupleType,DictType,InstanceType
> from DateTime import DateTime
>
> @@ -65,7 +66,6 @@
> """
>
> self.id = iid
> -
> if not request.has_key(iid):
> self.keys = None
> return
> @@ -74,6 +74,7 @@
> usage_param = iid + '_usage'
> if request.has_key(usage_param):
> self.usage = request[usage_param]
> + warn("\nZCatalog query using '%s' detected.\nUsing query parameters ending with '_usage' is deprecated.\nConsider using record-style parameters instead (see lib/python/Products/PluggableIndexes/README.txt for details)" % usage_param, DeprecationWarning)
>
> param = request[iid]
> keys = None
>
Andreas,
This checkin doesn't have accompanying changes to the tests (which now
spew DeprecationWarnings on the 2.7 branch). It is also not propagated
to the HEAD (only the doc/CHANGES.txt change made it there).
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-Dev
mailing list