Skip to content

Commit

Permalink
Drop support for Python 2.4 and 2.5.
Browse files Browse the repository at this point in the history
Replace deprecated 'zope.interface.implements' usage with equivalent
'zope.interface.implementer' decorator.
  • Loading branch information
tseaver committed May 18, 2012
1 parent 733359c commit 976f77b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
CHANGES
=======

3.6.2 (unreleased)
4.0.0 (unreleased)
------------------

- TBD
- Replaced deprecated ``zope.interface.implements`` usage with equivalent
``zope.interface.implementer`` decorator.

- Dropped support for Python 2.4 and 2.5.

3.6.1 (2010-05-05)
------------------
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

setup(name='zope.principalannotation',
version = '3.6.2dev',
version = '4.0.0dev',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Annotations for Zope Principals',
Expand All @@ -36,6 +36,9 @@ def read(*rnames):
'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',
Expand Down
6 changes: 2 additions & 4 deletions src/zope/principalannotation/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@

# TODO: register utility as adapter for IAnnotations on utility activation.

@interface.implementer(IPrincipalAnnotationUtility, IContained)
class PrincipalAnnotationUtility(Persistent):
"""Stores `IAnnotations` for `IPrinicipals`.
The utility ID is 'PrincipalAnnotation'.
"""

interface.implements(IPrincipalAnnotationUtility, IContained)

__parent__ = None
__name__ = None
Expand Down Expand Up @@ -66,11 +65,10 @@ def hasAnnotations(self, principal):
return principal.id in self.annotations


@interface.implementer(IAnnotations)
class Annotations(Persistent, Location):
"""Stores annotations."""

interface.implements(IAnnotations)

def __init__(self, principalId, store=None):
self.principalId = principalId
self.data = PersistentDict() # We don't really expect that many
Expand Down

0 comments on commit 976f77b

Please sign in to comment.