[Zope-Checkins] CVS: Zope/lib/python/AccessControl - SecurityInfo.py:1.17
Fred L. Drake, Jr.
fred@zope.com
Wed, 9 Jul 2003 12:26:01 -0400
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv12488/AccessControl
Modified Files:
SecurityInfo.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/AccessControl/SecurityInfo.py 1.16 => 1.17 ===
--- Zope/lib/python/AccessControl/SecurityInfo.py:1.16 Thu Nov 21 12:43:17 2002
+++ Zope/lib/python/AccessControl/SecurityInfo.py Wed Jul 9 12:24:57 2003
@@ -206,8 +206,8 @@
return
del _moduleSecurity[mname]
- if len(imp):
- apply(__import__, (mname,) + tuple(imp))
+ if imp:
+ __import__(mname, *imp)
module = sys.modules[mname]
modsec.apply(module.__dict__)
_appliedModuleSecurity[mname] = modsec