[Zope-Checkins] CVS: Zope/lib/python/logging - __init__.py:1.2

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


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

Modified Files:
	__init__.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/logging/__init__.py 1.1 => 1.2 ===
--- Zope/lib/python/logging/__init__.py:1.1	Mon Nov 25 14:25:16 2002
+++ Zope/lib/python/logging/__init__.py	Wed Jul  9 12:25:32 2003
@@ -81,6 +81,12 @@
 raiseExceptions = 1
 
 
+# apply() is defined locally to avoid deprecation warnings for Python
+# 2.3 and newer
+def apply(func, args, kwargs):
+    return func(*args, **kwargs)
+
+
 #---------------------------------------------------------------------------
 #   Level related stuff
 #---------------------------------------------------------------------------