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 e0d3c5b commit 01107c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
CHANGES
=======

3.9.1 (unreleased)
4.0.0 (unreleased)
==================

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

- Dropped support for Python 2.4 and 2.5.


3.9.0 (2009-08-27)
==================
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
open('CHANGES.txt').read())

setup(name='zope.ptresource',
version = '3.9.1dev',
version = '4.0.0dev',
url='http://pypi.python.org/pypi/zope.ptresource/',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
classifiers = ['Environment :: Web Environment',
'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',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3',
Expand Down
8 changes: 3 additions & 5 deletions src/zope/ptresource/ptresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""Page Template Resource
"""

from zope.interface import implements, classProvides
from zope.interface import implementer, classProvides
from zope.pagetemplate.engine import TrustedAppPT
from zope.pagetemplate.pagetemplatefile import PageTemplateFile
from zope.publisher.browser import BrowserView
Expand Down Expand Up @@ -49,10 +49,9 @@ def __call__(self, request, **keywords):
)
return self.pt_render(namespace)

@implementer(IBrowserPublisher)
class PageTemplateResource(BrowserView, Resource):

implements(IBrowserPublisher)

def publishTraverse(self, request, name):
'''See interface IBrowserPublisher'''
raise NotFound(None, name)
Expand All @@ -75,9 +74,8 @@ def GET(self):
response.setHeader("Content-Type", pt.content_type)
return pt(self.request)

@implementer(IResourceFactory)
class PageTemplateResourceFactory(object):

implements(IResourceFactory)
classProvides(IResourceFactoryFactory)

def __init__(self, path, checker, name):
Expand Down

0 comments on commit 01107c8

Please sign in to comment.