[Zope-Checkins] CVS: Zope/lib/python/ZServer/medusa - resolver.py:1.13

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


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

Modified Files:
	resolver.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/ZServer/medusa/resolver.py 1.12 => 1.13 ===
--- Zope/lib/python/ZServer/medusa/resolver.py:1.12	Tue Mar 18 16:15:17 2003
+++ Zope/lib/python/ZServer/medusa/resolver.py	Wed Jul  9 12:25:29 2003
@@ -303,15 +303,14 @@
         self.hook, self.callback = hook, callback
         
     def __call__ (self, *args):
-        apply (self.hook, args)
-        apply (self.callback, args)
+        self.hook(*args)
+        self.callback(*args)
         
 class caching_resolver (resolver):
     "Cache DNS queries.  Will need to honor the TTL value in the replies"
     
-    def __init__ (*args):
-        apply (resolver.__init__, args)
-        self = args[0]
+    def __init__(self, *args):
+        resolver.__init__(self, *args)
         self.cache = {}
         self.forward_requests = counter()
         self.reverse_requests = counter()