[Checkins]
SVN: zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/
Substitute zope.app.zapi by direct calls to its wrapped apis.
See bug 219302
Lorenzo Gil
lgs at sicem.biz
Thu Apr 24 14:31:53 EDT 2008
Log message for revision 85699:
Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302
Changed:
U zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/__init__.py
U zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py
-=-
Modified: zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/__init__.py
===================================================================
--- zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/__init__.py 2008-04-24 18:11:13 UTC (rev 85698)
+++ zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/__init__.py 2008-04-24 18:31:53 UTC (rev 85699)
@@ -31,11 +31,11 @@
from zope.interface import implements
from zope.component.interfaces import IViewFactory
+from zope.component import queryMultiAdapter
from zope.deprecation import deprecated
-from zope.traversing.api import getPath
+from zope.traversing.api import getName, getPath
from zope.location import locate
-from zope.app import zapi
from zope.app.component import queryNextUtility
from zope.app.container.interfaces import IOrderedContainer
from zope.app.container.interfaces import IContainerNamesContainer, INameChooser
@@ -64,7 +64,7 @@
if not hide_deprecation_warning:
warn("The `pluggableauth` module has been deprecated in favor of "
"the new `pas` code, which is much more modular and powerful.",
- DeprecationWarning, 2)
+ DeprecationWarning, 2)
self.earmark = earmark
# The earmark is used as a token which can uniquely identify
# this authentication utility instance even if the utility moves
@@ -80,7 +80,7 @@
def authenticate(self, request):
""" See `IAuthentication`. """
for ps_key, ps in self.items():
- loginView = zapi.queryMultiAdapter((ps, request), name="login")
+ loginView = queryMultiAdapter((ps, request), name="login")
if loginView is not None:
principal = loginView.authenticate()
if principal is not None:
@@ -233,12 +233,12 @@
if self.earmark is None:
# we manufacture what is intended to be a globally unique
# earmark if one is not provided in __init__
- myname = zapi.name(self)
+ myname = getName(self)
rand_id = gen_key()
t = int(time.time())
self.earmark = '%s-%s-%s' % (myname, rand_id, t)
-
+
class IBTreePrincipalSource(
ILoginPasswordPrincipalSource,
IContainerPrincipalSource,
Modified: zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py
===================================================================
--- zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py 2008-04-24 18:11:13 UTC (rev 85698)
+++ zope.app.pluggableauth/trunk/src/zope/app/pluggableauth/tests/test_pluggableauth.py 2008-04-24 18:31:53 UTC (rev 85699)
@@ -19,7 +19,6 @@
from zope.testing.doctestunit import DocTestSuite
from zope.interface.verify import verifyObject
-from zope.app import zapi
from zope.app.testing import ztapi, setup
from zope.app.component.testing import PlacefulSetup
More information about the Checkins
mailing list