Commit ef0d44ef authored by Alexandre Boeglin's avatar Alexandre Boeglin

revert r18209, r18210 and r18213 until a fully working solution is produced.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18221 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2662318c
......@@ -54,7 +54,6 @@ from Products.ERP5Type.patches import PersistencePatch
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
......
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
......@@ -75,7 +75,26 @@ ZopeTestCase.installProduct('MailHost', quiet=install_product_quiet)
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment