This is fixed now (I tried to merge with cvs up -r instead of -j...this caused the problem).
Unittests are also fixed.


-aj

--On Mittwoch, 7. Januar 2004 11:03 Uhr -0500 Tres Seaver <[EMAIL PROTECTED]> wrote:

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.





_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to