[Checkins] SVN: z3c.authviewlet/trunk/ Broke dependency on `zope.app.publisher` by defining our own ``ILogin`` interface.
Michael Howitz
mh at gocept.com
Sun Dec 27 08:25:21 EST 2009
Log message for revision 107159:
Broke dependency on `zope.app.publisher` by defining our own ``ILogin`` interface.
Changed:
U z3c.authviewlet/trunk/CHANGES.txt
U z3c.authviewlet/trunk/setup.py
U z3c.authviewlet/trunk/src/z3c/authviewlet/auth.py
U z3c.authviewlet/trunk/src/z3c/authviewlet/configure.zcml
A z3c.authviewlet/trunk/src/z3c/authviewlet/interfaces.py
-=-
Modified: z3c.authviewlet/trunk/CHANGES.txt
===================================================================
--- z3c.authviewlet/trunk/CHANGES.txt 2009-12-27 13:07:04 UTC (rev 107158)
+++ z3c.authviewlet/trunk/CHANGES.txt 2009-12-27 13:25:21 UTC (rev 107159)
@@ -5,10 +5,13 @@
0.6.1 (unreleased)
------------------
-- Moved files in ``z3c.authviewlet.browser`` to ``z3c.authviewlet`` as
+- Moved files in `z3c.authviewlet.browser` to `z3c.authviewlet` as
we only have browser code in this package.
+- Broke dependency on `zope.app.publisher` by defining our own
+ ``ILogin`` interface.
+
0.6.0 (2009-12-24)
------------------
@@ -18,8 +21,6 @@
------------------
- Moved authentication viewlet implementation from `z3c.layer.pagelet`
- to this package. Not sure but probably we should skip the dependency
- to ``zope.app.publisher.interfaces.http`` and use and define own
- interfaces.
+ to this package.
- Initial release.
Modified: z3c.authviewlet/trunk/setup.py
===================================================================
--- z3c.authviewlet/trunk/setup.py 2009-12-27 13:07:04 UTC (rev 107158)
+++ z3c.authviewlet/trunk/setup.py 2009-12-27 13:25:21 UTC (rev 107159)
@@ -1,76 +1,75 @@
-##############################################################################
-#
-# Copyright (c) 2007-2009 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Setup"""
-
-import os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-
-setup(
- name='z3c.authviewlet',
+##############################################################################
+#
+# Copyright (c) 2007-2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup"""
+
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+
+setup(
+ name='z3c.authviewlet',
version = '0.6.1dev',
- author='Zope Foundation and Contributors',
- author_email='zope-dev at zope.org',
- description = "Authentication viewlet for Zope3",
- long_description=(
- read('README.txt')
- + '\n\n' +
- '.. contents::'
- + '\n\n' +
- read('src', 'z3c', 'authviewlet', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- keywords = "z3c authentication viewlet zope zope3",
- classifiers = [
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- url='http://pypi.python.org/pypi/z3c.authviewlet',
- license='ZPL 2.1',
- packages = find_packages('src'),
- include_package_data = True,
- package_dir = {'':'src'},
- namespace_packages = ['z3c',],
- extras_require = dict(
- test = [
- 'zope.testbrowser',
- 'z3c.layer.pagelet',
- 'zope.app.testing',
- 'zope.testing',
- ],
- ),
- install_requires = [
- 'setuptools',
- 'z3c.layer.pagelet',
- 'zope.app.publisher',
- 'zope.authentication',
- 'zope.component',
- 'zope.i18n',
- 'zope.i18nmessageid',
- 'zope.interface',
- 'zope.viewlet',
- ],
- zip_safe = False,
-)
-
+ author='Zope Foundation and Contributors',
+ author_email='zope-dev at zope.org',
+ description = "Authentication viewlet for Zope3",
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ '.. contents::'
+ + '\n\n' +
+ read('src', 'z3c', 'authviewlet', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ keywords = "z3c authentication viewlet zope zope3",
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ url='http://pypi.python.org/pypi/z3c.authviewlet',
+ license='ZPL 2.1',
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['z3c',],
+ extras_require = dict(
+ test = [
+ 'zope.testbrowser',
+ 'z3c.layer.pagelet',
+ 'zope.app.testing',
+ 'zope.testing',
+ ],
+ ),
+ install_requires = [
+ 'setuptools',
+ 'z3c.layer.pagelet',
+ 'zope.authentication',
+ 'zope.component',
+ 'zope.i18n',
+ 'zope.i18nmessageid',
+ 'zope.interface',
+ 'zope.viewlet',
+ ],
+ zip_safe = False,
+)
+
Modified: z3c.authviewlet/trunk/src/z3c/authviewlet/auth.py
===================================================================
--- z3c.authviewlet/trunk/src/z3c/authviewlet/auth.py 2009-12-27 13:07:04 UTC (rev 107158)
+++ z3c.authviewlet/trunk/src/z3c/authviewlet/auth.py 2009-12-27 13:25:21 UTC (rev 107159)
@@ -11,13 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Login and Logout screens
-$Id:$
-"""
+"""Login and logout viewlets."""
+
import urllib
+import z3c.authviewlet.interfaces
import z3c.pagelet.interfaces
-import zope.app.publisher.interfaces.http
import zope.authentication.interfaces
import zope.component
import zope.i18n
@@ -117,7 +116,7 @@
class HTTPAuthenticationLogin(object):
- zope.interface.implements(zope.app.publisher.interfaces.http.ILogin)
+ zope.interface.implements(z3c.authviewlet.interfaces.ILogin)
def login(self, nextURL=None):
# we don't want to keep challenging if we're authenticated
Modified: z3c.authviewlet/trunk/src/z3c/authviewlet/configure.zcml
===================================================================
--- z3c.authviewlet/trunk/src/z3c/authviewlet/configure.zcml 2009-12-27 13:07:04 UTC (rev 107158)
+++ z3c.authviewlet/trunk/src/z3c/authviewlet/configure.zcml 2009-12-27 13:25:21 UTC (rev 107159)
@@ -50,7 +50,7 @@
name="login.html"
class=".auth.HTTPAuthenticationLogin"
attribute="login"
- allowed_interface="zope.app.publisher.interfaces.http.ILogin"
+ allowed_interface="z3c.authviewlet.interfaces.ILogin"
permission="zope.Public"
/>
@@ -106,7 +106,7 @@
name="logout.html"
class=".auth.HTTPAuthenticationLogout"
attribute="logout"
- allowed_interface="zope.app.publisher.interfaces.http.ILogout"
+ allowed_interface="zope.authentication.interfaces.ILogout"
permission="zope.Public"
/>
Added: z3c.authviewlet/trunk/src/z3c/authviewlet/interfaces.py
===================================================================
--- z3c.authviewlet/trunk/src/z3c/authviewlet/interfaces.py (rev 0)
+++ z3c.authviewlet/trunk/src/z3c/authviewlet/interfaces.py 2009-12-27 13:25:21 UTC (rev 107159)
@@ -0,0 +1,21 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+import zope.interface
+
+class ILogin(zope.interface.Interface):
+ """A login interface."""
+
+ def login():
+ """Login the user."""
Property changes on: z3c.authviewlet/trunk/src/z3c/authviewlet/interfaces.py
___________________________________________________________________
Added: svn:keywords
+ Id Rev Date
Added: svn:eol-style
+ native
More information about the checkins
mailing list