[Zope-Checkins] CVS: Zope/lib/python/Products/PythonScripts - PythonScript.py:1.48 standard.py:1.14
Fred L. Drake, Jr.
fred@zope.com
Wed, 9 Jul 2003 12:25:40 -0400
Update of /cvs-repository/Zope/lib/python/Products/PythonScripts
In directory cvs.zope.org:/tmp/cvs-serv12488/Products/PythonScripts
Modified Files:
PythonScript.py standard.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/Products/PythonScripts/PythonScript.py 1.47 => 1.48 ===
--- Zope/lib/python/Products/PythonScripts/PythonScript.py:1.47 Sun Jul 6 06:44:03 2003
+++ Zope/lib/python/Products/PythonScripts/PythonScript.py Wed Jul 9 12:25:03 2003
@@ -317,7 +317,7 @@
security=getSecurityManager()
security.addContext(self)
try:
- result = apply(f, args, kw)
+ result = f(*args, **kw)
if keyset is not None:
# Store the result in the cache.
self.ZCacheable_set(result, keywords=keyset)
=== Zope/lib/python/Products/PythonScripts/standard.py 1.13 => 1.14 ===
--- Zope/lib/python/Products/PythonScripts/standard.py:1.13 Sun Apr 13 13:51:54 2003
+++ Zope/lib/python/Products/PythonScripts/standard.py Wed Jul 9 12:25:03 2003
@@ -50,7 +50,7 @@
security=getSecurityManager()
security.addContext(self)
try:
- return apply(HTML.__call__, (self, client, REQUEST), kw)
+ return HTML.__call__(self, client, REQUEST, **kw)
finally: security.removeContext(self)