[Checkins] SVN: five.formlib/trunk/ - deal with forward compatibility with Zope 2.14
Yvo Schubbe
y.2011 at wcm-solutions.de
Tue Mar 8 05:48:51 EST 2011
Log message for revision 120797:
- deal with forward compatibility with Zope 2.14
- avoid charset negotiation
Changed:
U five.formlib/trunk/CHANGES.txt
U five.formlib/trunk/buildout.cfg
UU five.formlib/trunk/src/five/formlib/formbase.py
U five.formlib/trunk/src/five/formlib/tests/formlib.txt
-=-
Modified: five.formlib/trunk/CHANGES.txt
===================================================================
--- five.formlib/trunk/CHANGES.txt 2011-03-08 10:23:45 UTC (rev 120796)
+++ five.formlib/trunk/CHANGES.txt 2011-03-08 10:48:50 UTC (rev 120797)
@@ -4,7 +4,10 @@
1.0.5 - unreleased
------------------
+* Deal with forward compatibility with Zope 2.14.
+* Avoid charset negotiation.
+
1.0.4 - 2011-02-06
------------------
Modified: five.formlib/trunk/buildout.cfg
===================================================================
--- five.formlib/trunk/buildout.cfg 2011-03-08 10:23:45 UTC (rev 120796)
+++ five.formlib/trunk/buildout.cfg 2011-03-08 10:48:50 UTC (rev 120797)
@@ -1,5 +1,5 @@
[buildout]
-extends = http://download.zope.org/Zope2/index/2.13.3/versions.cfg
+extends = http://download.zope.org/Zope2/index/2.13.5/versions.cfg
parts = test
develop = .
Modified: five.formlib/trunk/src/five/formlib/formbase.py
===================================================================
--- five.formlib/trunk/src/five/formlib/formbase.py 2011-03-08 10:23:45 UTC (rev 120796)
+++ five.formlib/trunk/src/five/formlib/formbase.py 2011-03-08 10:48:50 UTC (rev 120797)
@@ -12,8 +12,6 @@
#
##############################################################################
"""Five baseclasses for zope.formlib.form
-
-$Id$
"""
import os.path
@@ -24,7 +22,8 @@
_ = MessageFactory("zope")
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-from Products.Five.browser.decode import processInputs, setPageEncoding
+from Products.Five.browser.decode import processInputs
+from ZPublisher import HTTPRequest
_FORMLIB_DIR = os.path.dirname(zope.formlib.__file__)
_PAGEFORM_PATH = os.path.join(_FORMLIB_DIR, 'pageform.pt')
@@ -45,8 +44,9 @@
# decoded first and the page encoding is set before proceeding.
def update(self):
- processInputs(self.request)
- setPageEncoding(self.request)
+ # BBB: for Zope < 2.14
+ if not getattr(self.request, 'postProcessInputs', False):
+ processInputs(self.request, [HTTPRequest.default_encoding])
super(FiveFormlibMixin, self).update()
Property changes on: five.formlib/trunk/src/five/formlib/formbase.py
___________________________________________________________________
Deleted: svn:keywords
- Id
Modified: five.formlib/trunk/src/five/formlib/tests/formlib.txt
===================================================================
--- five.formlib/trunk/src/five/formlib/tests/formlib.txt 2011-03-08 10:23:45 UTC (rev 120796)
+++ five.formlib/trunk/src/five/formlib/tests/formlib.txt 2011-03-08 10:48:50 UTC (rev 120797)
@@ -45,7 +45,6 @@
... from Products.Five.testbrowser import Browser
>>> browser = Browser()
- >>> browser.addHeader('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')
>>> browser.addHeader('Accept-Language', 'en-US')
>>> browser.addHeader('Authorization', 'Basic manager:r00t')
@@ -69,7 +68,8 @@
>>> browser.getControl(name="form.actions.apply").click()
>>> isinstance(folder.content_1.title, unicode)
True
- >>> folder.content_1.title == ni_hao.decode('utf-8')
+ >>> from ZPublisher import HTTPRequest
+ >>> folder.content_1.title == ni_hao.decode(HTTPRequest.default_encoding)
True
Adding a new content object, with two list items:
More information about the checkins
mailing list