[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - mapply.py:1.7
Fred L. Drake, Jr.
fred@zope.com
Wed, 9 Jul 2003 12:25:59 -0400
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv12488/ZPublisher
Modified Files:
mapply.py
Log Message:
Replace apply(f,args,kw) with f(*args,**kw) to avoid deprecation warnings
from Python 2.3.
These warnings are displayed when running the unit tests.
This patch fixes the occurrances that are triggered by the unit tests;
there are probably others.
=== Zope/lib/python/ZPublisher/mapply.py 1.6 => 1.7 ===
--- Zope/lib/python/ZPublisher/mapply.py:1.6 Wed Aug 14 18:09:40 2002
+++ Zope/lib/python/ZPublisher/mapply.py Wed Jul 9 12:25:23 2003
@@ -14,7 +14,7 @@
"""
def default_call_object(object, args, context):
- result=apply(object,args) # Type s<cr> to step into published object.
+ result=object(*args) # Type s<cr> to step into published object.
return result
def default_missing_name(name, context):
@@ -86,4 +86,4 @@
args=tuple(args)
if debug is not None: return debug(object,args,context)
- else: return apply(object,args)
+ else: return object(*args)