[Checkins] SVN: zope.principalregistry/trunk/ Drop support for Python 2.4 and 2.5.

Tres Seaver cvs-admin at zope.org
Fri May 18 03:40:05 UTC 2012


Log message for revision 126035:
  Drop support for Python 2.4 and 2.5.
  
  Replace deprecated 'zope.interface.implements' usage with equivalent
  'zope.interface.implementer' decorator.
  
  
  

Changed:
  U   zope.principalregistry/trunk/CHANGES.txt
  U   zope.principalregistry/trunk/setup.py
  U   zope.principalregistry/trunk/src/zope/principalregistry/principalregistry.py
  U   zope.principalregistry/trunk/src/zope/principalregistry/tests/test_principalregistry.py

-=-
Modified: zope.principalregistry/trunk/CHANGES.txt
===================================================================
--- zope.principalregistry/trunk/CHANGES.txt	2012-05-18 03:35:56 UTC (rev 126034)
+++ zope.principalregistry/trunk/CHANGES.txt	2012-05-18 03:40:01 UTC (rev 126035)
@@ -2,12 +2,15 @@
 CHANGES
 =======
 
-3.7.2 (unreleased)
+4.0.0 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Replaced deprecated ``zope.interface.implements`` usage with equivalent
+  ``zope.interface.implementer`` decorator.
 
+- Dropped support for Python 2.4 and 2.5.
 
+
 3.7.1 (2010-09-25)
 ------------------
 

Modified: zope.principalregistry/trunk/setup.py
===================================================================
--- zope.principalregistry/trunk/setup.py	2012-05-18 03:35:56 UTC (rev 126034)
+++ zope.principalregistry/trunk/setup.py	2012-05-18 03:40:01 UTC (rev 126035)
@@ -20,7 +20,7 @@
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
 setup(name='zope.principalregistry',
-      version='3.7.2dev',
+      version='4.0.0dev',
       author='Zope Foundation and Contributors',
       author_email='zope-dev at zope.org',
       description='Global principal registry component for Zope3',
@@ -36,6 +36,9 @@
           'Intended Audience :: Developers',
           'License :: OSI Approved :: Zope Public License',
           'Programming Language :: Python',
+          'Programming Language :: Python :: 2',
+          'Programming Language :: Python :: 2.6',
+          'Programming Language :: Python :: 2.7',
           'Natural Language :: English',
           'Operating System :: OS Independent',
           'Topic :: Internet :: WWW/HTTP',

Modified: zope.principalregistry/trunk/src/zope/principalregistry/principalregistry.py
===================================================================
--- zope.principalregistry/trunk/src/zope/principalregistry/principalregistry.py	2012-05-18 03:35:56 UTC (rev 126034)
+++ zope.principalregistry/trunk/src/zope/principalregistry/principalregistry.py	2012-05-18 03:40:01 UTC (rev 126035)
@@ -14,7 +14,7 @@
 """Global Authentication Utility or Principal Registry
 """
 from zope.component import getUtility
-from zope.interface import implements
+from zope.interface import implementer
 import zope.security.management
 from zope.security.interfaces import IGroupAwarePrincipal
 from zope.password.interfaces import IPasswordManager
@@ -39,10 +39,9 @@
     pass
 
 
+ at implementer(IAuthentication, ILogout)
 class PrincipalRegistry(object):
 
-    implements(IAuthentication, ILogout)
-
     # Methods implementing IAuthentication
 
     def authenticate(self, request):
@@ -167,10 +166,9 @@
     def getLogin(self):
         return '' # to make registry search happy
 
+ at implementer(IGroupAwarePrincipal)
 class Principal(PrincipalBase):
 
-    implements(IGroupAwarePrincipal)
-
     def __init__(self, id, title, description, login,
             pw, pwManagerName="Plain Text"):
         super(Principal, self).__init__(id, title, description)
@@ -189,11 +187,11 @@
         return pwManager.checkPassword(self.__pw, pw)
 
 
+ at implementer(IUnauthenticatedPrincipal)
 class UnauthenticatedPrincipal(PrincipalBase):
+    pass
 
-    implements(IUnauthenticatedPrincipal)
 
-
 fallback_unauthenticated_principal = (
     UnauthenticatedPrincipal(
         __name__+'.fallback_unauthenticated_principal',
@@ -203,14 +201,15 @@
         'None as the unauthenticated principal.'))
 
 
+ at implementer(IUnauthenticatedGroup)
 class UnauthenticatedGroup(Group):
+    pass
 
-    implements(IUnauthenticatedGroup)
-
+ at implementer(IAuthenticatedGroup)
 class AuthenticatedGroup(Group):
+    pass
 
-    implements(IAuthenticatedGroup)
-
+ at implementer(IEveryoneGroup)
 class EverybodyGroup(Group):
+    pass
 
-    implements(IEveryoneGroup)

Modified: zope.principalregistry/trunk/src/zope/principalregistry/tests/test_principalregistry.py
===================================================================
--- zope.principalregistry/trunk/src/zope/principalregistry/tests/test_principalregistry.py	2012-05-18 03:35:56 UTC (rev 126034)
+++ zope.principalregistry/trunk/src/zope/principalregistry/tests/test_principalregistry.py	2012-05-18 03:40:01 UTC (rev 126035)
@@ -16,8 +16,6 @@
 import unittest
 from zope.authentication.interfaces import PrincipalLookupError
 from zope.authentication.loginpassword import LoginPassword
-from zope.component import provideAdapter
-from zope.interface import implements
 from zope.password.testing import setUpPasswordManagers
 
 from zope.principalregistry.principalregistry import PrincipalRegistry



More information about the checkins mailing list