[Zope-Checkins] CVS: Zope/lib/python/Products/ExternalMethod - ExternalMethod.py:1.52

Fred L. Drake, Jr. fred@zope.com
Wed, 9 Jul 2003 12:26:05 -0400


Update of /cvs-repository/Zope/lib/python/Products/ExternalMethod
In directory cvs.zope.org:/tmp/cvs-serv12488/Products/ExternalMethod

Modified Files:
	ExternalMethod.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/ExternalMethod/ExternalMethod.py 1.51 => 1.52 ===
--- Zope/lib/python/Products/ExternalMethod/ExternalMethod.py:1.51	Wed Aug 14 18:14:10 2002
+++ Zope/lib/python/Products/ExternalMethod/ExternalMethod.py	Wed Jul  9 12:24:59 2003
@@ -221,14 +221,14 @@
 
         __traceback_info__=args, kw, self._v_func_defaults
 
-        try: return apply(f,args,kw)
+        try: return f(*args, **kw)
         except TypeError, v:
             tb=sys.exc_info()[2]
             try:
                 if ((self._v_func_code.co_argcount-
                      len(self._v_func_defaults or ()) - 1 == len(args))
                     and self._v_func_code.co_varnames[0]=='self'):
-                    return apply(f,(self.aq_parent.this(),)+args,kw)
+                    return f(self.aq_parent.this(), *args, **kw)
 
                 raise TypeError, v, tb
             finally: tb=None