[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate - DT_Let.py:1.14 DT_Util.py:1.89

Fred L. Drake, Jr. fred@zope.com
Thu, 27 Feb 2003 12:31:28 -0500


Update of /cvs-repository/Zope/lib/python/DocumentTemplate
In directory cvs.zope.org:/tmp/cvs-serv10271

Modified Files:
	DT_Let.py DT_Util.py 
Log Message:
Remove use of apply(); apply() generates a PendingDeprecationWarning when
used with Python 2.3.

=== Zope/lib/python/DocumentTemplate/DT_Let.py 1.13 => 1.14 ===
--- Zope/lib/python/DocumentTemplate/DT_Let.py:1.13	Wed Aug 14 18:29:52 2002
+++ Zope/lib/python/DocumentTemplate/DT_Let.py	Thu Feb 27 12:31:27 2003
@@ -106,5 +106,5 @@
     result.append((name,value))
 
     text=text[l:].strip()
-    if text: return apply(parse_let_params,(text,result,tag),parms)
+    if text: return parse_let_params(text,result,tag,**parms)
     else: return result


=== Zope/lib/python/DocumentTemplate/DT_Util.py 1.88 => 1.89 ===
--- Zope/lib/python/DocumentTemplate/DT_Util.py:1.88	Wed Aug 14 18:29:52 2002
+++ Zope/lib/python/DocumentTemplate/DT_Util.py	Thu Feb 27 12:31:27 2003
@@ -150,7 +150,7 @@
         incorrect "self" argument.  It could be caused by a product which
         is not yet compatible with this version of Zope.  The traceback
         information may contain more details.)'''
-    return apply(self, (), kw)
+    return self(**kw)
 
 d['namespace']=namespace
 
@@ -399,14 +399,14 @@
                 'Invalid attribute name, "%s"' % name, tag)
         else:
             result['']=name
-        return apply(parse_params,(text[l:],result),parms)
+        return parse_params(text[l:],result,**parms)
     elif mo_unq:
         name=mo_unq.group(2)
         l=len(mo_unq.group(1))
         if result: raise ParseError, (
             'Invalid attribute name, "%s"' % name, tag)
         else: result['']=name
-        return apply(parse_params,(text[l:],result),parms)
+        return parse_params(text[l:],result,**parms)
     else:
         if not text or not text.strip(): return result
         raise ParseError, ('invalid parameter: "%s"' % text, tag)
@@ -424,5 +424,5 @@
     result[name]=value
 
     text=text[l:].strip()
-    if text: return apply(parse_params,(text,result),parms)
+    if text: return parse_params(text,result,**parms)
     else: return result