Skip to content

Commit

Permalink
restore Zope 2.10 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Jan 23, 2011
1 parent d7e742f commit d05a747
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
CHANGES
=======

2.4.2 (unreleased)
2.4.2 (2011-01-22)
------------------

- Adjust test for the contentprovider feature to not depend on the
ContentProviderBase class that was introduced in zope.contentprovider 3.5.0.
This restores compatibility with Zope 2.10.

- Security issue, removed IBrowserRequest from IFormLayer. This prevents to
mixin IBrowserRequest into non IBrowserRequest e.g. IJSONRPCRequest.
This should be compatible since a browser request using z3c.form already
Expand Down
10 changes: 7 additions & 3 deletions src/z3c/form/contentprovider.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ The usual request instance::

>>> request = TestRequest()

We want to insert a content provider inbetween fields.
We want to insert a content provider in between fields.
We define a test content provider that renders extra help text::

>>> from zope.contentprovider.provider import ContentProviderBase
>>> class ExtendedHelp(ContentProviderBase):
>>> from zope.publisher.browser import BrowserView
>>> from zope.contentprovider.interfaces import IContentProvider
>>> class ExtendedHelp(BrowserView):
... def __init__(self, context, request, view):
... super(ExtendedHelp, self).__init__(context, request)
... self.__parent__ = view
...
... def update(self):
... self.person = self.context.id
Expand Down

0 comments on commit d05a747

Please sign in to comment.