[Erp5-report] r18221 - in /erp5/trunk/products/ERP5Type: ./ patches/ tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 11 11:24:27 CET 2007
Author: alex
Date: Tue Dec 11 11:24:26 2007
New Revision: 18221
URL: http://svn.erp5.org?rev=18221&view=rev
Log:
revert r18209, r18210 and r18213 until a fully working solution is produced.
Removed:
erp5/trunk/products/ERP5Type/patches/iHotfix.py
Modified:
erp5/trunk/products/ERP5Type/ZopePatch.py
erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
Modified: erp5/trunk/products/ERP5Type/ZopePatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ZopePatch.py?rev=18221&r1=18220&r2=18221&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ZopePatch.py (original)
+++ erp5/trunk/products/ERP5Type/ZopePatch.py Tue Dec 11 11:24:26 2007
@@ -54,7 +54,6 @@
from Products.ERP5Type.patches import PersistentMapping
from Products.ERP5Type.patches import DateTimePatch
from Products.ERP5Type.patches import PythonScript
-from Products.ERP5Type.patches import iHotfix
# for python2.3 compatibility
import threading
Removed: erp5/trunk/products/ERP5Type/patches/iHotfix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/iHotfix.py?rev=18220&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/iHotfix.py (original)
+++ erp5/trunk/products/ERP5Type/patches/iHotfix.py (removed)
@@ -1,9 +1,0 @@
-from Products import iHotfix
-
-from Products.PageTemplates.PageTemplate import PageTemplate
-from TAL.TALInterpreter import TALInterpreter, FasterStringIO
-
-# revert iHotfix patch that forces PageTemplate to output a string instead of
-# a unicode object
-TALInterpreter.StringIO = FasterStringIO
-PageTemplate.StringIO = FasterStringIO
Modified: erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py?rev=18221&r1=18220&r2=18221&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py (original)
+++ erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py Tue Dec 11 11:24:26 2007
@@ -75,7 +75,26 @@
ZopeTestCase.installProduct('PageTemplates', quiet=install_product_quiet)
ZopeTestCase.installProduct('PythonScripts', quiet=install_product_quiet)
ZopeTestCase.installProduct('ExternalMethod', quiet=install_product_quiet)
-ZopeTestCase.installProduct('iHotfix', quiet=install_product_quiet)
+try:
+ # Workaround iHotFix patch that doesn't work with
+ # ZopeTestCase REQUESTs
+ ZopeTestCase.installProduct('iHotfix', quiet=install_product_quiet)
+ from Products import iHotfix
+ from types import UnicodeType
+ # revert monkey patchs from iHotfix
+ iHotfix.get_request = get_request
+
+ originalStringIO = iHotfix.originalStringIO
+ class UnicodeSafeStringIO(originalStringIO):
+ """StringIO like class which never fails with unicode."""
+ def write(self, s):
+ if isinstance(s, UnicodeType):
+ s = s.encode('utf8', 'repr')
+ originalStringIO.write(self, s)
+ # iHotFix will patch PageTemplate StringIO with
+ iHotfix.iHotfixStringIO = UnicodeSafeStringIO
+except ImportError:
+ pass
ZopeTestCase.installProduct('Localizer', quiet=install_product_quiet)
ZopeTestCase.installProduct('TimerService', quiet=install_product_quiet)
More information about the Erp5-report
mailing list